Re: Assorted improvements in pg_dump

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Hans Buschmann <buschmann@nidsa.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-12-03T21:33:42Z
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 →
  1. pg_dump: avoid unsafe function calls in getPolicies().

  2. Postpone calls of unsafe server-side functions in pg_dump.

  3. Account for TOAST data while scheduling parallel dumps.

  4. Use PREPARE/EXECUTE for repetitive per-object queries in pg_dump.

  5. Avoid per-object queries in performance-critical paths in pg_dump.

  6. Rethink pg_dump's handling of object ACLs.

  7. Refactor pg_dump's tracking of object components to be dumped.

  8. pg_dump: fix mis-dumping of non-global default privileges.

Attachments

Here's an updated version of this patch set.  The only non-line-number
changes are

(1) in 0004, I dealt with the issue of not having unnest() in old branches
by bumping the minimum remote server version to 8.4.  Seeing that we seem
to have consensus in the other thread to push the minimum up to somewhere
around 9.2, I see no point in making this patch put in conditional code
that we'd shortly rip out again.

(2) I also added some comments to 0004 to hopefully address Justin's
confusion about string lengths.

I feel quite fortunate that a month's worth of commitfest hacking
didn't break any of these patches.  Unless someone intends to
review these more thoroughly than they already have, I'd like to
go ahead and push them.

			regards, tom lane