Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: ahodgson@simkin.ca, pgsql-bugs@lists.postgresql.org
Date: 2023-03-03T18:41:26Z
Lists: pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-Mar-03, Tom Lane wrote:
>> Basically just make the recursive steps match on tgparentid instead
>> of name, like this.

> Thank you, looks sane to me.

OK, will work on getting it committed.

> 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.  I
> suppose it would be very useful if the Ruby on Rails community would run
> their tests more often on new Postgres versions (or even on the tip of
> stable branches).

Um ... 13.x and 14.x aren't showing the problem, or is there something
I missed?  But I agree that it'd be good if we could get some Ruby folk
to test more promptly --- it's pretty sad that this didn't get noticed
sooner in v15.

			regards, tom lane



Commits

  1. Avoid failure when altering state of partitioned foreign-key triggers.

  2. Fix ENABLE/DISABLE TRIGGER to handle recursion correctly