pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nitin Motiani <nitinmotiani@google.com>
Cc: Hannu Krosing <hannuk@google.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible
Date: Thu, 12 Feb 2026 15:59:24 -0600
Message-ID: <aY5NPLeup3VVucsb@nathan> (raw)
In-Reply-To: <aY5FaQuLTA0jFinh@alap3.anarazel.de>
References: <aYTVAFTPelebVl6W@nathan>
	<nt56moqkh6yoerzw5cml6qu7m4mxu65vqtgdt3nbm5mhpg5hqt@4s5oa3sqhzub>
	<aYTwC8V50rPgw6GE@nathan>
	<t3zu4hyzwqws4puaqd2lhdlw7yp2ckgswuaaizmfi6seto3x4w@5exxg3kazkos>
	<aYT95PGdMvHHzwsP@nathan>
	<aYUL01ZYpDBaZ7qN@nathan>
	<jaqwqwwiy57bhg36jru4mvjznzemrhgobyynpqvyp573m7h3rt@2kpgm5sfkbyy>
	<aYkHiDrBRz2snwyn@nathan>
	<aYzuAz_ITUpd9ZvH@nathan>
	<aY5FaQuLTA0jFinh@alap3.anarazel.de>

On Thu, Feb 12, 2026 at 04:46:30PM -0500, Andres Freund wrote:
> On 2026-02-11 15:00:51 -0600, Nathan Bossart wrote:
>> This was a little more painful than I expected, but this seems to be what
>> is required to allow COPY-ing pg_largeobject_metadata during binary
>> upgrades from < v12.
> 
> Nice!

Thanks for looking.

> Not really the fault of this patch, but it seems somewhat grotty that this has
> binary upgrade specific code in this place.  I was certainly confused when
> first trying to use pg_dump in binary upgrade mode with large objects, because
> no data was dumped when using plain text mode, which is what I had been using
> for simplicity...

Yeah, this has been an annoyance while hacking in this area.  I haven't
looked into what it'd take to fix it, though.

> I guess you could instead generate a COPY using WITH OIDS. But it's probably
> not worth having that path, given we already need to support COPY (SELECT ..).

Ah, I forgot all about that COPY option...

> as we'd just include the oid column without needing to somehow include it in
> the attribute list.
> 
> [...]
> 
> I guess WITH OIDs also would avoid the need for this.

Will give it a try.

-- 
nathan





view thread (39+ messages)  latest in thread

Message-ID: <aY5NPLeup3VVucsb@nathan>
Permalink:  ../aY5NPLeup3VVucsb@nathan/
Also on:    postgresql.org/message-id/aY5NPLeup3VVucsb@nathan

 · 

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: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, andres@anarazel.de, michael@paquier.xyz, tgl@sss.pgh.pa.us, nitinmotiani@google.com, hannuk@google.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible
  In-Reply-To: <aY5NPLeup3VVucsb@nathan>

* 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