pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u
Дата
Msg-id E1o9pA7-001oEp-8a@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Preserve relfilenode of pg_largeobject and its index across pg_upgrade.

Commit 9a974cbcba005256a19991203583a94b4f9a21a9 did this for user
tables, but pg_upgrade treats pg_largeobject as a user table, and so
needs the same treatment. Without this fix, if you rewrite the
pg_largeobject table and then perform an upgrade with pg_upgrade, the
table will apparently be empty on the new cluster, while all of your
objects will end up with an orphaned file.

With this fix, instead of the old cluster's pg_largeobject files ending
up orphaned, the original files fro the new cluster do. That's mostly
harmless because we expect the table to be empty, but we might want
to arrange to remove the as part of the upgrade. Since we're still
debating the best way of doing that, I (rhaas) have decided to postpone
dealing with that problem and get the basic fix committed.

Justin Pryzby, reviewed by Shruthi Gowda and by me.

Discussion: http://postgr.es/m/20220701231413.GI13040@telsasoft.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a2996478c32d27171a786f59eff0505b1722b9ea

Modified Files
--------------
src/bin/pg_dump/pg_dump.c              | 37 ++++++++++++++++++++--------------
src/bin/pg_upgrade/t/002_pg_upgrade.pl |  2 ++
2 files changed, 24 insertions(+), 15 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Only allow returning string types or bytea from json_serialize
Следующее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Add missing inequality searches to rbtree