Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function - Mailing list pgsql-bugs

From 'Andres Freund'
Subject Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function
Date
Msg-id 20141106212412.GB12525@awork2.anarazel.de
Whole thread Raw
In response to Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 2014-11-06 16:15:15 -0500, Tom Lane wrote:
> "Paragon Corporation" <lr@pcorp.us> writes:
> > I can pull from latest git and then run the tests again if you think the
> > issue is fixed.
>
> No, the given test case crashes HEAD just fine.  Robert seems to have
> changed the invariants around the trigger query stack in some inconsistent
> fashion.

I think it's just a missing

if (depth < afterTriggers.maxquerydepth)
   continue;
or similar in AfterTriggerPendingOnRel, inside the second loop.

Alternatively we could make the for something like
depth = 0; depth <= Min(afterTriggers.query_depth, afterTriggers.query_depth - 1)
but that doesn't seem prettier.

Robert?

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-bugs by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [HACKERS] BUG #11867: Strange behaviour with composite types after resetting database tablespace
Next
From: Jim Nasby
Date:
Subject: Re: [HACKERS] ltree::text not immutable?