-
-
Notifications
You must be signed in to change notification settings - Fork 228
fix(exts): handle pg_upgrade generated update_extensions.sql script in the extension tests #1896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
28b6e73 to
1a9394d
Compare
1a9394d to
cecd0ca
Compare
dbb2ab9 to
537ceef
Compare
537ceef to
d90c5b4
Compare
771718f to
4e32d5b
Compare
acf3ba4 to
42b0c29
Compare
fa26b67 to
0131d17
Compare
d90c5b4 to
6a7a2c5
Compare
WalkthroughAdds runtime detection of an update_extensions.sql script during the PostgreSQL 17 upgrade flow, conditionally runs it and adjusts extension-version assertions; inserts Changes
Sequence Diagram(s)sequenceDiagram
participant TestHarness as Test Harness
participant FS as Filesystem
participant PG as PostgreSQL 17
TestHarness->>PG: switch to PG 17 configuration
TestHarness->>FS: check /var/lib/postgresql/update_extensions.sql (has_update_script?)
alt update script present
TestHarness->>PG: run update_extensions.sql
PG-->>TestHarness: extensions updated
TestHarness->>TestHarness: assert versions == versions["17"][-1]
else no update script
TestHarness->>TestHarness: assert versions == last_version_from_15
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…n the extension tests pg_upgrade may generate an update_extensions.sql script to update extensions after a major version upgrade. This commit modifies the extension tests to check for the presence of this script after upgrading PostgreSQL to version 17. If the script exists, it is executed to ensure that the extensions are updated correctly.
Thanks to the improvement related to the generated pg_upgrade script, we can now reuse the generic postgres extension test for postgis.
This helps us identify why certain extensions do not use the generic tests.
Address CodeRabbit feedback to prevent race conditions when running update scripts by ensuring PostgreSQL is fully ready before proceeding.
6a7a2c5 to
a31a691
Compare
pg_upgrade may generate an update_extensions.sql script to update extensions after a major version upgrade.
This PR modifies the extension tests to check for the presence of this script after upgrading PostgreSQL to version 17.
If the script exists, it is executed to ensure that the extensions are updated correctly.
Summary by CodeRabbit
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.