Skip to content

Commit 04d24e8

Browse files
authored
fix: wrappers upgrade from 0.3.0 to 0.4.1 (#1062)
1 parent f79c4d1 commit 04d24e8

File tree

1 file changed

+9
-0
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+9
-0
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ function cleanup {
2525
exit "$EXIT_CODE"
2626
}
2727

28+
function execute_extension_upgrade_patches {
29+
if [ -f "/var/lib/postgresql/extension/wrappers--0.3.1--0.4.1.sql" ] && [ ! -f "/usr/share/postgresql/15/extension/wrappers--0.3.0--0.4.1.sql" ]; then
30+
cp /var/lib/postgresql/extension/wrappers--0.3.1--0.4.1.sql /var/lib/postgresql/extension/wrappers--0.3.0--0.4.1.sql
31+
ln -s /var/lib/postgresql/extension/wrappers--0.3.0--0.4.1.sql /usr/share/postgresql/15/extension/wrappers--0.3.0--0.4.1.sql
32+
fi
33+
}
34+
2835
function execute_patches {
2936
# Patch pg_net grants
3037
PG_NET_ENABLED=$(run_sql -A -t -c "select count(*) > 0 from pg_extension where extname = 'pg_net';")
@@ -99,6 +106,8 @@ function complete_pg_upgrade {
99106
CI_start_postgres --new-bin
100107
fi
101108

109+
execute_extension_upgrade_patches || true
110+
102111
echo "4. Running generated SQL files"
103112
retry 3 run_generated_sql
104113

0 commit comments

Comments
 (0)