public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: [email protected]
Subject: pgsql: pg_upgrade: Use COPY for LO metadata for upgrades from < v12.
Date: Mon, 16 Feb 2026 21:13:57 +0000
Message-ID: <[email protected]> (raw)

pg_upgrade: Use COPY for LO metadata for upgrades from < v12.

Before v12, pg_largeobject_metadata was defined WITH OIDS, so
unlike newer versions, the "oid" column was a hidden system column
that pg_dump's getTableAttrs() will not pick up.  Thus, for commit
161a3e8b68, we did not bother trying to use COPY for
pg_largeobject_metadata for upgrades from older versions.  This
commit removes that restriction by adjusting the query in
getTableAttrs() to pick up the "oid" system column and by teaching
dumpTableData_copy() to use COPY (SELECT ...) for this catalog,
since system columns cannot be used in COPY's column list.

Reviewed-by: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/aYzuAz_ITUpd9ZvH%40nathan

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c |  7 +---
src/bin/pg_dump/pg_dump.c            | 77 ++++++++++++++++++------------------
2 files changed, 40 insertions(+), 44 deletions(-)



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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: pg_upgrade: Use COPY for LO metadata for upgrades from < v12.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox