Re: Prevent foreign key references to unlogged partitions

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Subject: Re: Prevent foreign key references to unlogged partitions
Date: 2026-11-15 04:06:38
Message-ID: CAGRkXqR58GNSujRsFWDhN72NzTpJUAejygA3ApgBjhPU02rf2g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Zsolt,

Thanks for your patches. I have some thoughts.

1. For 003, a SET LOGGED that fails the foreign key check rewrites
the table first. I think it will create too much overhead.

I did a experiment on a 270MB table and your patch writes 310MB wal.
Master only writes 88bytes.

2. For 004, this seems already captured in a different bug[1], I think the
current patch is to reject access to the table from the trigger.

If that goes in, would 0004 still be needed?

[1]https://postgr.es/m/29523cc1.253e7.1a080818743.Coremail.njuptlgq@163.com

Thanks,

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-11-15 04:15:47 Incremental Sort crash on a rescan that becomes bounded
Previous Message shihao zhong 2026-11-15 03:57:28 Re: two statement_timeout race conditions