Re: Bug: Deferred FKey Check Happening on Double Update, Not Single - Mailing list pgsql-bugs

From Sergei Kornilov
Subject Re: Bug: Deferred FKey Check Happening on Double Update, Not Single
Date
Msg-id 2447821550216518@myt6-add70abb4f02.qloud-c.yandex.net
Whole thread Raw
In response to Bug: Deferred FKey Check Happening on Double Update, Not Single  (Doug Safreno <doug@avinetworks.com>)
Responses Re: Bug: Deferred FKey Check Happening on Double Update, Not Single  (Doug Safreno <doug@avinetworks.com>)
List pgsql-bugs
Hi

> Which one is expected?

Both are expected. This is foreign key check optimisation: we can safely skip FK trigger check if row was inserted not
inthis transaction and update does not touch FK fields:
https://github.com/postgres/postgres/blob/REL_11_STABLE/src/backend/utils/adt/ri_triggers.c#L1769

> And is this really a bug?
 
so no, this is not bug.

regards, Sergei


pgsql-bugs by date:

Previous
From: John Klann
Date:
Subject: Re: BUG #15636: PostgreSQL 11.1 pg_basebackup backup to a CIFSdestination throws fsync error at end of backup
Next
From: Marc Schablewski
Date:
Subject: Re: BUG #15637: Problem insert data 【Japanese】