Re: Fix pg_upgrade to preserve datdba
От
Tom Lane
Тема
Re: Fix pg_upgrade to preserve datdba
Дата
Msg-id
398379.1616354950@sss.pgh.pa.us
Ответ на
Re: Fix pg_upgrade to preserve datdba (Tom Lane)
Список
Дерево обсуждения
Re: pg_upgrade failing for 200+ million Large Objects Jan Wieck <jan@wi3ck.info>
Re: pg_upgrade failing for 200+ million Large Objects Nathan Bossart <nathandbossart@gmail.com>
Re: pg_upgrade failing for 200+ million Large Objects Jacob Champion <jchampion@timescale.com>
Re: pg_upgrade failing for 200+ million Large Objects Nathan Bossart <nathandbossart@gmail.com>
Re: pg_upgrade failing for 200+ million Large Objects Jacob Champion <jchampion@timescale.com>
Re: pg_upgrade failing for 200+ million Large Objects "Kumar, Sachin" <ssetiya@amazon.com>
Re: pg_upgrade failing for 200+ million Large Objects Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_upgrade failing for 200+ million Large Objects "Kumar, Sachin" <ssetiya@amazon.com>
Re: pg_upgrade failing for 200+ million Large Objects Andres Freund <andres@anarazel.de>
Re: pg_upgrade failing for 200+ million Large Objects "Kumar, Sachin" <ssetiya@amazon.com>
Re: pg_upgrade failing for 200+ million Large Objects Nathan Bossart <nathandbossart@gmail.com>
Re: pg_upgrade failing for 200+ million Large Objects Michael Paquier <michael@paquier.xyz>
I wrote:
> ... so at least in this case it's doing the right thing. We need a bit
> more detail about the context in which it's doing the wrong thing
> for you.
Just to cross-check, I tried modifying pg_upgrade's regression test
as attached, and it still passes. (And inspection of the leftover
dump2.sql file verifies that the database ownership was correct.)
So I'm not sure what's up here.
regards, tom lane
diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh
index 9c6deae294..436646b5ba 100644
--- a/src/bin/pg_upgrade/test.sh
+++ b/src/bin/pg_upgrade/test.sh
@@ -150,6 +150,9 @@ export EXTRA_REGRESS_OPTS
standard_initdb "$oldbindir"/initdb
"$oldbindir"/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
+# Create another user (just to exercise database ownership restoration).
+createuser regression_dbowner || createdb_status=$?
+
# Create databases with names covering the ASCII bytes other than NUL, BEL,
# LF, or CR. BEL would ring the terminal bell in the course of this test, and
# it is not otherwise a special case. PostgreSQL doesn't support the rest.
@@ -160,7 +163,7 @@ dbname1='\"\'$dbname1'\\"\\\'
dbname2=`awk 'BEGIN { for (i = 46; i < 91; i++) printf "%c", i }'
В списке pgsql-hackers по дате отправления