File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -308,10 +308,11 @@ function initiate_upgrade {
308
308
309
309
echo " 7. Disabling extensions and generating post-upgrade script"
310
310
handle_extensions
311
+
312
+ # TODO: Only do postgres <-> supabase_admin swap if upgrading from postgres
313
+ # as bootstrap user to supabase_admin as bootstrap user.
311
314
312
315
echo " 8. TODO"
313
- echo " local all all trust
314
- $( cat /etc/postgresql/pg_hba.conf) " > /etc/postgresql/pg_hba.conf
315
316
run_sql -c " alter role postgres superuser;"
316
317
run_sql -c " create role supabase_tmp login superuser;"
317
318
psql -h localhost -U supabase_tmp -d postgres " $@ " << -EOSQL
@@ -370,6 +371,14 @@ EOSQL
370
371
su -c " $PGBINNEW /initdb -L $PGSHARENEW -D $PGDATANEW / --username=supabase_admin" -s " $SHELL " postgres
371
372
fi
372
373
374
+ # TODO: Make this declarative, replace file with the most up to date content
375
+ # of pg_hba.conf.j2. Otherwise we'd need to supply the password for
376
+ # supabase_admin, because pg_upgrade connects to the db as supabase_admin
377
+ # using unix sockets, which is gated behind scram-sha-256 per the current
378
+ # pg_hba.conf.j2.
379
+ echo " local all all trust
380
+ $( cat /etc/postgresql/pg_hba.conf) " > /etc/postgresql/pg_hba.conf
381
+
373
382
UPGRADE_COMMAND=$( cat << EOF
374
383
time ${PGBINNEW} /pg_upgrade \
375
384
--old-bindir="${PGBINOLD} " \
You can’t perform that action at this time.
0 commit comments