Re: [PATCH] session_replication_role = replica with TRUNCATE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] session_replication_role = replica with TRUNCATE
Date
Msg-id f230bcb5-e0a9-3f0c-7b13-2fb1ccc94cef@2ndquadrant.com
Whole thread Raw
In response to Re: [PATCH] session_replication_role = replica with TRUNCATE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1/18/18 12:41, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> So I'm proposing the attached alternative patch, which creates
>> constraint triggers to be TRIGGER_FIRES_ALWAYS by default.
>> Thoughts?
> 
> Hm, the general idea seems attractive, but I'm not sure we want
> this behavioral change for user-created triggers.  Can we make it
> happen like that only for RI triggers specifically?  If not, there's
> at least some missing doco changes here.

I never quite understood the difference between a normal trigger and a
constraint trigger.  But perhaps this should be it.  If the purpose of a
constraint trigger is to enforce a constraint, then this should be the
default behavior, I think.  You could always manually ALTER TABLE things.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] session_replication_role = replica with TRUNCATE
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)