pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u 2+ messages / 1 participants [nested] [flat]
* pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u @ 2022-07-08 14:40 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2022-07-08 14:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d498e052b4b84ae21b3b68d5b3fda6ead65d1d4d 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u @ 2022-07-08 14:40 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2022-07-08 14:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-07-08 14:40 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-07-08 14:40 pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u Robert Haas <rhaas@postgresql.org> 2022-07-08 14:40 pgsql: Preserve relfilenode of pg_largeobject and its index across pg_u Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox