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, 5 Feb 2026 13:31:23 -0600
Message-ID: <aYTwC8V50rPgw6GE@nathan> (raw)
In-Reply-To: <nt56moqkh6yoerzw5cml6qu7m4mxu65vqtgdt3nbm5mhpg5hqt@4s5oa3sqhzub>
References: <aLsoIeIxlCi-L7C_@nathan>
	<aLuKa8FWd_uMPzSg@paquier.xyz>
	<aL8sgVdZcuqZnvXn@nathan>
	<3yd2ss6n7xywo6pmhd7jjh3bqwgvx35bflzgv3ag4cnzfkik7m@hiyadppqxx6w>
	<sc2uulu7gaajlnis7vqx25hmn6yd74drnlbzvupskx7jwyzejb@3vwodvuurtqb>
	<aYNuhbXkM5h8Zcsu@nathan>
	<aYOnT5EqAqI3ooBO@nathan>
	<qfp7z4c3m6bw53oky33halcdhomiijod6segzrhf757ijjvapr@e5rf4u5wnfmu>
	<aYTVAFTPelebVl6W@nathan>
	<nt56moqkh6yoerzw5cml6qu7m4mxu65vqtgdt3nbm5mhpg5hqt@4s5oa3sqhzub>

On Thu, Feb 05, 2026 at 01:02:17PM -0500, Andres Freund wrote:
> Upthread I also wondering why we do all the work in getLOs() if we don't
> actually need most of it (only if there are comments or labels).  Right now
> that's a very slow and very memory intensive part of doing an upgrade of a
> system with a lot of binary upgrades.  Do we need *any* of that if we go the
> path you suggest?

AFAICT we only need it for the comments and security labels later on.
Commit a45c78e3 did batch 1000 large objects into each ArchiveEntry, but of
course there can still be a ton of entries.  In theory, we could update the
pg_largeobject_metadata query to only retrieve LOs with comments and
security labels.  I'm not sure it's worth trying to optimize further than
that; we've long operated under the assumption that comments/seclabels on
LOs are pretty rare.

-- 
nathan





view thread (39+ messages)  latest in thread

Message-ID: <aYTwC8V50rPgw6GE@nathan>
Permalink:  ../aYTwC8V50rPgw6GE@nathan/
Also on:    postgresql.org/message-id/aYTwC8V50rPgw6GE@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: <aYTwC8V50rPgw6GE@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