Skip to content

Commit 7e2735f

Browse files
committed
fix (15.6): wrappers for pg_upgrade
1 parent 96a912f commit 7e2735f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

nix/ext/wrappers/default.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,22 @@ buildPgrxExtension_0_11_3 rec {
7979
else
8080
echo "Warning: $sql_file not found"
8181
fi
82+
83+
echo "Creating wrappers.so symlinks to support pg_upgrade..."
84+
lib_file="$out/lib/wrappers-$current_version.so"
85+
86+
if [ -f "$lib_file" ]; then
87+
while read -r previous_version; do
88+
if [ "$(printf '%s\n' "$previous_version" "$current_version" | sort -V | head -n1)" = "$previous_version" ] && [ "$previous_version" != "$current_version" ]; then
89+
new_file="$out/lib/wrappers-$previous_version.so"
90+
echo "Creating $new_file"
91+
ln -s "$lib_file" "$new_file"
92+
fi
93+
done < git_tags.txt
94+
else
95+
echo "Warning: $lib_file not found"
96+
fi
97+
8298
rm git_tags.txt
8399
'';
84100

0 commit comments

Comments
 (0)