Re: Assorted improvements in pg_dump
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Hans Buschmann <buschmann@nidsa.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-10-25T20:42:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_dump: avoid unsafe function calls in getPolicies().
- b7333e826955 11.19 landed
- a5b26aaafe4f 13.10 landed
- 1ed6f1b9116c 12.14 landed
- 03ac48549438 14.7 landed
- 3e6e86abca01 15.0 landed
-
Postpone calls of unsafe server-side functions in pg_dump.
- e46e986baef0 13.10 landed
- b1f106420b1a 11.19 landed
- 55f30e6c7640 14.7 landed
- 344b7849200f 12.14 landed
- e3fcbbd623b9 15.0 landed
-
Account for TOAST data while scheduling parallel dumps.
- 65aaed22a849 15.0 landed
-
Use PREPARE/EXECUTE for repetitive per-object queries in pg_dump.
- be85727a3df7 15.0 landed
-
Avoid per-object queries in performance-critical paths in pg_dump.
- 9895961529ef 15.0 landed
-
Rethink pg_dump's handling of object ACLs.
- 0c9d84427f44 15.0 landed
-
Refactor pg_dump's tracking of object components to be dumped.
- 5209c0ba0bfd 15.0 landed
-
pg_dump: fix mis-dumping of non-global default privileges.
- 2acc84c6fd29 15.0 cited
On 2021-Oct-25, Tom Lane wrote: > Yeah, I wasn't too happy with the static bools either. However, each > function would need its own field in the struct, which seems like a > maintenance annoyance, plus a big hazard for future copy-and-paste > changes (ie, copy and paste the wrong flag name -> trouble). Also > the Archive struct is shared between dump and restore cases, so > adding a dozen fields that are irrelevant for restore didn't feel > right. So I'd like a better idea, but I'm not sure that that one > is better. What about a separate struct passed from pg_dump's main() to the functions that execute queries, containing a bunch of bools? This'd still have the problem that mindless copy and paste would cause a bug, but I wonder if that isn't overstated: if you use the wrong flag, pg_dump would fail as soon as you try to invoke your query when it hasn't been prepared yet. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "I'm impressed how quickly you are fixing this obscure issue. I came from MS SQL and it would be hard for me to put into words how much of a better job you all are doing on [PostgreSQL]." Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php