Skip to content

Commit 971248f

Browse files
committed
fix(pg_stat_monitor): exclude v1.0 from pg_upgrade compatibility tests
When upgrading from PostgreSQL 15 to 17, pg_stat_monitor version 1.0 (PG 15-only) cannot be migrated as it uses .sql.in template files that reference MODULE_PATHNAME without proper processing for the target version. This marks version 1.0 as not pg_upgrade compatible and filters it from the version test list, allowing the test to use version 2.1 (which supports both PG 15 and 17) for pg_upgrade validation instead. Version 1.0 remains available for PG 15 installations. Also updates the expected test output for version 2.1's schema changes.
1 parent 97f6464 commit 971248f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

nix/ext/pg_stat_monitor.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ let
1717
) allVersions;
1818

1919
# Derived version information
20-
versions = lib.naturalSort (lib.attrNames supportedVersions);
21-
latestVersion = lib.last versions;
22-
numberOfVersions = builtins.length versions;
20+
allVersionsList = lib.naturalSort (lib.attrNames supportedVersions);
21+
versions = builtins.filter (v: (allVersions.${v}.pgUpgradeCompatible or true)) allVersionsList;
22+
latestVersion = lib.last allVersionsList;
23+
numberOfVersions = builtins.length allVersionsList;
2324
packages = builtins.attrValues (
2425
lib.mapAttrs (name: value: build name value.hash value.revision) supportedVersions
2526
);

nix/ext/versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,8 @@
755755
"15"
756756
],
757757
"revision": "1.0.1",
758-
"hash": "sha256-sQEpIknAFOmvNTX2G23X4BvMdy3Ms7sXx7hLZt8jyUk="
758+
"hash": "sha256-sQEpIknAFOmvNTX2G23X4BvMdy3Ms7sXx7hLZt8jyUk=",
759+
"pgUpgradeCompatible": false
759760
},
760761
"2.1": {
761762
"postgresql": [

0 commit comments

Comments
 (0)