File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,16 @@ function initiate_upgrade {
289
289
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
290
290
PG_UPGRADE_BIN_DIR=$( nix build " github:supabase/postgres/${NIX_FLAKE_VERSION} #psql_15/bin" --no-link --print-out-paths --extra-experimental-features nix-command --extra-experimental-features flakes)
291
291
PGSHARENEW=" $PG_UPGRADE_BIN_DIR /share/postgresql"
292
+
293
+ # Determine if pgroonga is enabled, if so then install the groonga flake
294
+ PGROONGA_ENABLED=$( run_sql -A -t -c " SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = 'pgroonga');" )
295
+ if [ " $PGROONGA_ENABLED " = " t" ]; then
296
+ sudo -u postgres bash -c " . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install \" github:supabase/postgres/${NIX_FLAKE_VERSION} #supabase-groonga\" "
297
+ mkdir -p /etc/environment.d
298
+ if [ ! -f /etc/environment.d/postgresql.env ] || ! grep -q " GRN_PLUGINS_DIR" /etc/environment.d/postgresql.env; then
299
+ echo " GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins" >> /etc/environment.d/postgresql.env
300
+ fi
301
+ fi
292
302
fi
293
303
294
304
PGBINNEW=" $PG_UPGRADE_BIN_DIR /bin"
You can’t perform that action at this time.
0 commit comments