Re: Can we get rid of repeated queries from pg_dump?

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: depesz@depesz.com
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, pgsql-hackers@lists.postgresql.org
Date: 2021-08-31T19:06:25Z
Lists: pgsql-hackers, pgsql-general
hubert depesz lubaczewski <depesz@depesz.com> writes:
> My point in here is that potential optimizations regarding queries for
> pg_proc might speed up dumps for more people - as they might use things
> like postgis, but never realized that it can be much faster.

Agreed, but as I said upthread, fixing that looks like it will be
rather invasive.  Meanwhile, I went ahead and pushed the two
simple improvements discussed so far.

			regards, tom lane



Commits

  1. In pg_dump, avoid doing per-table queries for RLS policies.

  2. Cache the results of format_type() queries in pg_dump.