Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork221
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
jfroche wants to merge56 commits intoupdate-nixpkgsChoose a base branch fromfix/nixos-test-update-after-pg-upgrade
base:update-nixpkgs
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+619 −855
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
28b6e73 to1a9394dCompare1a9394d tocecd0caComparedbb2ab9 to537ceefCompareThese overlay packages will be removed once the extensions are updatedto use the new `buildPgrxExtension` function.
The previously used version was failing to build:/build/source/src/common/get_check_data.c: In function 'pgr_SPI_getText':/build/source/src/common/get_check_data.c:307:28: error: passing argument 1 of 'DatumGetCString' makes integer from pointer without a cast [-Wint-conversion] 307 | return DatumGetCString(SPI_getvalue(*tuple, *tupdesc, info.colNumber)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | char *In file included from /build/source/include/c_common/postgres_connection.h:29, from /build/source/src/common/get_check_data.c:27:/nix/store/nn6vpjqlsxxmynwcrsib9agb3hpr5cqj-postgresql-17.4/include/server/postgres.h:335:23: note: expected 'Datum' {aka 'long unsigned int'} but argument is of type 'char *' 335 | DatumGetCString(Datum X) | ~~~~~~^make[2]: *** [src/common/CMakeFiles/common.dir/build.make:149: src/common/CMakeFiles/common.dir/get_check_data.c.o] Error 1This was discussed upstream here:https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6%40technowledgy.deAlso applied by nixpkgs here:NixOS/nixpkgs#342026
We cannot use nodejs.libv8 as it is too new for plv8 3.1.We will be able to use it with plv8 3.2.
dbmate 2.27 is now using a varchar for the version column in theschema_migrations table.Seeamacneil/dbmate#641
Updated cargo-pgrx buildPgrxExtension with rustc wrapper to handle emptypostmaster_stub.rs files that cause duplicate symbol errors.(first two filenames are `` and`/build/tmp.*/postmaster_stubs/nix/store/*/bin/postmaster_stub.rs`)pg_jsonschema cargo checks fails on specific versions (0.2.0, 0.3.1, 0.3.3).
Remove deprecated functions that were removed in newer pgrouting versions(_pgr_betweennesscentrality and _pgr_contractionhierarchies).
Improves reproducibility and avoids evaluation-time network access byusing a proper flake input instead of fetchTarball for the older nixpkgsneeded by pg_net and plv8.
…64-darwinVersion 0.19.5 has a dangling pointer issue in src/core.c:177 that causescompilation to fail on aarch64-darwin with newer clang versions. This adds-Wno-error=dangling-assignment to allow compilation to proceed.The flag is restricted to aarch64-darwin only since GCC on Linux doesn'trecognize this warning option.
Add -headerpad_max_install_names linker flag to prevent 'install_name_tool:changing install names or rpaths can't be redone' errors on macOS. Thisallocates sufficient header space for install_name_tool to modify theshared library during post-install processing.
… extensionsTest assertions were inconsistent: expecting {version}.so and {extension_name}-{version}.sopatterns while actual libraries use {lib_name}-{version}.so (e.g. pg_partman_bgw-5.3.1.so,timescaledb-loader-2.16.1.so). Updated PostgresExtensionTest to accept Optional[str] lib_nameparameter and use consistent {lib_name}-{version}.so assertions throughout.Added missing timescaledb-loader.so symlink creation and updated the switch script tomaintain both symlinks when switching versions.Fixes 'Expected timescaledb version 2.16.1, but found timescaledb-loader-2.16.1.so' and'Expected pg_partman version 5.3.1, but found pg_partman_bgw-5.3.1.so' test failures.Use overlay instead of passing full nixpkgs-oldstable to avoid exposingentire old nixpkgs attribute set. Now provides specific packages(curl_8_4, v8_oldstable) through overlay.
Keep revision support that was accidentally simplified during nixpkgs update.Restores conditional logic to support building orioledb from specific gitrevision hashes instead of only tags.
These files were moved to subdirectories and the old .nix files should beremoved since they were moved to new directory structure with default.nix files.
Remove nixpkgs-go124 dependency since current nixpkgs has Go 1.25.4which is sufficient for packer. Remove nix-fast-build input as unusedand add follows directives to resolve duplicate dependencies.
Run flake-linter to eliminate duplicate dependencies, and remove unusedcargo-pgrx / rustc versions hashes.
Move pgrouting.nix to pgrouting/default.nix and groonga package topgroonga/groonga.nix. Update imports and fix relative paths for versions.jsonand patch files.
Replace inline bash script generation with writeShellScriptBin for rustcwrapper that filters empty postmaster_stub.rs arguments. Apply wrapper onlyfor pgrx < 0.12 since issue was fixed upstream in pgrx#1435 and pgrx#1441.
Move nixpkgs-oldstable import to a let binding to avoid importing itthree times...
Remove supabase-groonga from global flake packages and import it locallyin pgroonga extension instead. Other components access groonga viapgroonga.passthru.groonga since groonga is only used by pgroonga.
The supabase-groonga package was moved to pgroonga extension in commit1f0ed1f,but Ansible was still trying to install it separately causing build failures.
This reverts commit 55474686405394826ad07a032cbcf0e36a924554.
This reverts commit cfa9bcb92219f391469ae743f95c8856b0a99561.
Remove references to darwin.apple_sdk.frameworks.{IOKit,CoreFoundation}which have been deprecated in nixpkgs. Disable CGO to avoid Darwinframework dependencies entirely.…n the extension testspg_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.
537ceef tod90c5b4Compare771718f to4e32d5bCompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.