Re: pg_upgrade failing for 200+ million Large Objects
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, "Kumar,
Sachin" <ssetiya@amazon.com>,
Robins Tharakan <tharakan@gmail.com>, Jan Wieck <jan@wi3ck.info>,
Bruce Momjian <bruce@momjian.us>,
Andrew Dunstan <andrew@dunslane.net>,
Magnus Hagander <magnus@hagander.net>,
Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-03-15T23:18:41Z
Lists: pgsql-hackers
Attachments
- v11-0001-Some-small-preliminaries-for-pg_dump-changes.patch (text/x-diff) patch v11-0001
- v11-0002-In-dumps-group-large-objects-into-matching-metad.patch (text/x-diff) patch v11-0002
- v11-0003-Move-BLOBS-METADATA-TOC-entries-into-SECTION_DAT.patch (text/x-diff) patch v11-0003
- v11-0004-Invent-transaction-size-option-for-pg_restore.patch (text/x-diff) patch v11-0004
- v11-0005-Improve-storage-efficiency-for-BLOB-ACLs.patch (text/x-diff) patch v11-0005
- v11-0006-Be-more-conservative-about-transaction-size-in-p.patch (text/x-diff) patch v11-0006
This patch seems to have stalled out again. In hopes of getting it over the finish line, I've done a bit more work to address the two loose ends I felt were probably essential to deal with: * Duplicative blob ACLs are now merged into a single TOC entry (per metadata group) with the GRANT/REVOKE commands stored only once. This is to address the possibly-common case where a database has a ton of blobs that have identical-but-not-default ACLs. I have not done anything about improving efficiency for blob comments or security labels. I think it's reasonable to assume that blobs with comments are pets not cattle, and there won't be many of them. I suppose it could be argued that seclabels might be used like ACLs with a lot of duplication, but I doubt that there's anyone out there at all putting seclabels on blobs in practice. So I don't care to expend effort on that. * Parallel pg_upgrade cuts the --transaction-size given to concurrent pg_restore jobs by the -j factor. This is to ensure we keep the shared locks table within bounds even in parallel mode. Now we could go further than that and provide some direct user control over these hard-wired settings, but I think that could be left for later, getting some field experience before we design an API. In short, I think this patchset is more or less commitable. 0001-0004 are rebased up to HEAD, but differ only in line numbers from the v10 patchset. 0005 handles ACL merging, and 0006 does the other thing. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Count individual SQL commands in pg_restore's --transaction-size mode.
- 81db073a2878 17.0 landed
- 0f1290521504 18.0 landed
-
Reduce number of commands dumpTableSchema emits for binary upgrade.
- b3f0e0503f33 18.0 landed
- 2fa989e6a340 17.0 landed
-
Invent --transaction-size option for pg_restore.
- 959b38d770ba 17.0 landed
-
Rearrange pg_dump's handling of large objects for better efficiency.
- a45c78e3284b 17.0 landed
-
Add temporal PRIMARY KEY and UNIQUE constraints
- 46a0cd4cefb4 17.0 cited
-
Fix typo and case in messages
- 7d7ef075d2b3 17.0 cited