Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails
Date
Msg-id 2614795.1677872014@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> I wonder how come this problem took so long to be detected with Ruby on
>> Rails; it's been in released 13.x and 14.x for seven months now.

> Um ... 13.x and 14.x aren't showing the problem, or is there something
> I missed?

Oh!  Running the same test shows that while 12.x through 14.x do not
throw an error, they don't disable the child table's triggers either.

Moreover, we can't apply this fix idea since there is no tgparentid
linkage (or indeed any parent trigger to link to).

It's not hard to see one way to fix it: if the initial call is "for
all triggers", forget about recursing for individual triggers and
instead recursively do a "for all triggers" on the child.  However,
that would be the sort of semantics change that people tend to bitch
about in stable branches, because it'd nuke non-inherited triggers
too.

I'm kind of inclined to leave things alone pre-v15.  I asssume the
existing behavior had been that way all along, or do you have reason
to think it changed recently in those branches?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails
Next
From: Alexander Lakhin
Date:
Subject: Re: BUG #17821: Assertion failed in heap_update() due to heap pruning