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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
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 14:45:28
Message-ID: CAApHDvrvi5Lq=9ZgsvBDTRSQONRBPVcmwQ80zB2w5jAydYLJ0A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

David

Attachment Content-Type Size
v2-0001-Add-precheck-any-referencing-rows-when-adding-a-F.patch text/plain 3.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Hüseyin Demir 2026-11-27 14:11:52 Re: [PATCH] Report changes discarded for relations not in the subscription