From 3455fc137aeefd340c38b4c4cf224eaf71175081 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 18 Nov 2021 17:04:51 -0800 Subject: [PATCH] upgrade-postgresql: Check for extension upgrade steps. --- scripts/setup/upgrade-postgresql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/setup/upgrade-postgresql b/scripts/setup/upgrade-postgresql index 37bc8f8e71..72653b8e7d 100755 --- a/scripts/setup/upgrade-postgresql +++ b/scripts/setup/upgrade-postgresql @@ -57,6 +57,9 @@ su postgres -c "/usr/lib/postgresql/$UPGRADE_TO/bin/vacuumdb --all --analyze-onl pg_dropcluster "$UPGRADE_FROM" main apt remove -y "postgresql-$UPGRADE_FROM" if [ -n "$SCRIPTS_PATH" ]; then + if [ -f "$SCRIPTS_PATH/update_extensions.sql" ]; then + su postgres -c "psql $SCRIPTS_PATH/update_extensions.sql" + fi su postgres -c "$SCRIPTS_PATH/delete_old_cluster.sh" rm -rf "$SCRIPTS_PATH" else