Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Hannu Krosing <hannuk(at)google(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nitin Motiani <nitinmotiani(at)google(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible
Date: 2025-08-19 19:18:40
Message-ID: aKTOEGwYP1QbzE1K@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 19, 2025 at 09:49:26AM +0200, Hannu Krosing wrote:
> Have you considered re-creating pg_shdepend from
> pg_largeobject_metadata directly instead of having special cases for
> dumping it ?

I considered it when you last brought up the idea [0], but my testing
indicated that it's measurably slower.

> It would also be useful in cases of old (pg_upgraded since before pg
> 12) databases which might be missing it anyway.

We only use COPY for upgrades from v12 and newer, and the patch at hand
only applies to v16 and newer. There should be no need to repair
pg_shdepend for any such upgrades because we haven't copied/linked the
files since before v12.

[0] https://postgr.es/m/CAMT0RQTXiqH7zdQEVSVd2L7_Cw4wQ1eHOD8hfZ%2B0vecMXJWc-w%40mail.gmail.com

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-08-19 19:23:44 Re: Conflict detection for update_deleted in logical replication
Previous Message Masahiko Sawada 2025-08-19 19:16:47 Re: Add CHECK_FOR_INTERRUPTS in pg_buffercache_pages while scanning the buffers