From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: In pg_dump, use simplehash.h to look up dumpable objects by OID.
Date: Fri, 22 Oct 2021 21:19:28 +0000
Message-ID: <E1me1wm-0003K2-3P@gemulon.postgresql.org> (raw)
In pg_dump, use simplehash.h to look up dumpable objects by OID.
Create a hash table that indexes dumpable objects by CatalogId
(that is, catalog OID + object OID). Use this to replace the
former catalogIdMap array, as well as various other single-
catalog index arrays, and also the extension membership map.
In principle this should be faster for databases with many objects,
since lookups are now O(1) not O(log N). However, it seems that these
lookups are pretty much negligible in context, so that no overall
performance change can be measured. But having only one lookup
data structure to maintain makes the code simpler and more flexible,
so let's do it anyway.
Discussion: https://postgr.es/m/2595220.1634855245@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/92316a4582a5714d4e494aaf90360860e7fec37a
Modified Files
--------------
src/bin/pg_dump/common.c | 510 ++++++++++++++++++--------------------------
src/bin/pg_dump/pg_backup.h | 1 +
src/bin/pg_dump/pg_dump.c | 14 +-
src/bin/pg_dump/pg_dump.h | 12 +-
4 files changed, 209 insertions(+), 328 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: In pg_dump, use simplehash.h to look up dumpable objects by OID.
In-Reply-To: <E1me1wm-0003K2-3P@gemulon.postgresql.org>
References: <E1me1wm-0003K2-3P@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox