Skip to content

fix(upgrade): drop dynamic_library_path from the pg_upgrade config - #2601

Closed
mmlb wants to merge 2 commits into
developfrom
push-lvklmykysosl
Closed

mmlb wants to merge 2 commits into
developfrom
push-lvklmykysosl

Conversation

@mmlb

@mmlb mmlb commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Doing a major upgrade from 15.*.007 to 17.*.007+ newer fails when target PG starts up and tries to load supautils with following error:

undefined symbol: bms_is_empty

This is because we use the source pg config as is with dynamic_library_path = '/nix/var/nix/profiles/site/lib/postgresql:$libdir' which will cause PG17 to load PG15's supautils and fail.

What is the new behavior?

We drop dynamic_library_path from the temporary config so PG17 uses the supautils in its own profile.

Upgrades from 15.19.0.007 to 17 fail when pg_upgrade starts the new
cluster: it loads supautils from the site profile, which holds the
PG15 build, and fails with "undefined symbol: bms_is_empty".

pg_upgrade runs both clusters with a copy of the old cluster's
postgresql.conf, and since #2424 that sets dynamic_library_path to the
site profile first. Dropping it from the copy makes each cluster load
the supautils bundled with its own postgres package from $libdir. The
upgraded instance keeps its own config and site profile.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@mmlb
mmlb requested a review from a team as a code owner October 28, 2026 14:22
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Package version diff: none (aarch64-linux, x86_64-linux)

@mmlb

mmlb commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

superseded by #2602

@mmlb mmlb closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant