From: | Doug Safreno <doug(at)avinetworks(dot)com> |
---|---|
To: | Sergei Kornilov <sk(at)zsrv(dot)org> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Gregory Cox <gcox(at)avinetworks(dot)com>, Sambit Das <sambit(dot)das(at)avinetworks(dot)com>, Vivek Kalyanaraman <vivek(at)avinetworks(dot)com>, Anand Parthasarathy <anpartha(at)avinetworks(dot)com>, webapp-dev <webapp-dev(at)avinetworks(dot)com> |
Subject: | Re: Bug: Deferred FKey Check Happening on Double Update, Not Single |
Date: | 2019-02-15 22:35:23 |
Message-ID: | CAA=+orv3dihLAEp7f49o-kHkiJ6d=yTknjuk0RgLPbrtxYMFdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hey Sergei,
Neither transaction touches FK fields - so shouldn't they both skip FK
trigger check?
Best,
Doug
On Thu, Feb 14, 2019 at 11:42 PM Sergei Kornilov <sk(at)zsrv(dot)org> wrote:
> 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 in this 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2019-02-15 23:15:25 | Re: Bug: Deferred FKey Check Happening on Double Update, Not Single |
Previous Message | Peter Eisentraut | 2019-02-15 16:03:29 | Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs |