Re: Should we skip foreign key checks in binary upgrade mode?

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Should we skip foreign key checks in binary upgrade mode?
Date: 2026-11-27 19:44:03
Message-ID: b594f49c-9a43-45b6-bdaa-4909e8400c1e@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27/11/2026 16:45, David Rowley wrote:
> On Fri, 27 Nov 2026 at 22:02, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>> The table_rescan() seems a bit ugly to me, I'd rather restructure the
>> loop slightly to avoid that. Maybe turn it from "while
>> (table_scan_getnextslot())" into "do {} while(table_scan_getnextslot())"
>>
>> The comments could use some copy-editing. It mentions "pg_dump
>> --schema-only" explicitly, but I think it's even more generally true
>> that the table is likely to be empty. And the comment about temporal FKs
>> seems misplaced now, that should still be above the "if (!hasperiod)" check.
>
> Thanks for looking. Updated patch attached.

The commit message subject sounds grammatically wrong to me. And the
comment about the check for zero rows sounds a little repetitive to me.
But those are just tiny nits and a matter of taste, LGTM otherwise.

(Thanks for working on this general area of making pg_upgrade faster!)

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-27 20:10:02 logical decoding: removing change_useless_for_repack()
Previous Message Heikki Linnakangas 2026-11-27 19:32:02 Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin