Re: improve performance of pg_dump --binary-upgrade

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-04-18T21:19:24Z
Lists: pgsql-hackers

Attachments

On Thu, Apr 18, 2024 at 10:33:08PM +0200, Daniel Gustafsson wrote:
> From a read-through they look good, a very nice performance improvement in an
> important path.  I think it would be nice with some comments on the
> BinaryUpgradeClassOids struct (since the code using it is thousands of lines
> away), and a comment on the if (oids == NULL) block explaining the caching.

Added.  Thanks for reviewing!  Unfortunately, this one will have to sit for
a couple months...

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Commits

  1. Improve performance of binary_upgrade_set_pg_class_oids().

  2. Remove is_index parameter from binary_upgrade_set_pg_class_oids().

  3. pg_upgrade: Preserve relfilenodes and tablespace OIDs.

  4. pg_dump: minor performance improvements from eliminating sub-SELECTs.