pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Minor cleanup/optimization in pg_dump.
Date: Thu, 30 Dec 2021 19:29:41 +0000
Message-ID: <E1n317N-0001a2-Kr@gemulon.postgresql.org> (raw)

Minor cleanup/optimization in pg_dump.

In the wake of commits 05649b88c and 5209c0ba0, findComments() and
findSecLabels() no longer use their "Archive *fout" arguments,
so get rid of those.

While doing that, I noticed that there's no very good reason why
dumpCompositeTypeColComments() should be doing its own query to fetch
the column names of the composite type, when the calling function has
just fetched the same data.  Tweak it to use that query result.  This
probably doesn't save a lot for most people, because since 5209c0ba0
we won't get into this code at all unless the composite type has at
least one comment.  Nonetheless, it's a wasted query.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c7cf73eb7b9e7911748ebe117a7219f21e504121

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 84 ++++++++++++++++-------------------------------
1 file changed, 29 insertions(+), 55 deletions(-)



Message-ID: <E1n317N-0001a2-Kr@gemulon.postgresql.org>
Permalink:  ../E1n317N-0001a2-Kr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n317N-0001a2-Kr@gemulon.postgresql.org

 · 

reply

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: Minor cleanup/optimization in pg_dump.
  In-Reply-To: <E1n317N-0001a2-Kr@gemulon.postgresql.org>
  References: <E1n317N-0001a2-Kr@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