Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XmUXY-0001oS-Bi for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Nov 2014 21:24:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XmUXX-0005sN-VG for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Nov 2014 21:24:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XmUXX-0005sH-BQ for pgsql-bugs@postgresql.org; Thu, 06 Nov 2014 21:24:23 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XmUXS-0001Ol-SX for pgsql-bugs@postgresql.org; Thu, 06 Nov 2014 21:24:22 +0000 Received: from anarazel.de (p5DDC7980.dip0.t-ipconnect.de [93.220.121.128]) by mrelayeu.kundenserver.de (node=mreue004) with ESMTP (Nemesis) id 0M9cEd-1XtKoj0Fzj-00D0UF; Thu, 06 Nov 2014 22:24:14 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 396C2100B43; Thu, 6 Nov 2014 22:24:13 +0100 (CET) Date: Thu, 6 Nov 2014 22:24:12 +0100 From: 'Andres Freund' To: Tom Lane Cc: Paragon Corporation , 'Robert Haas' , pgsql-bugs@postgresql.org Subject: Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function Message-ID: <20141106212412.GB12525@awork2.anarazel.de> References: <20141106180115.26930.84739@wrigleys.postgresql.org> <20141106180617.GE12193@alap3.anarazel.de> <9D18BF962F7141868C3DF332C22F4C8B@O> <16197.1415308515@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16197.1415308515@sss.pgh.pa.us> X-Provags-ID: V02:K0:WawXwF2+Vhv+AO66ekw91WIDoDl+HIfaUMNQgOVc3sx vPq4WnHqkYgfH0EcE76VaGtDmKqoLHiRyNR3WBwrJ2mHSeqoBO 2wuYcpssuTXs8FsA0ZFFAFcXnWjNiTJ+tHs6BifPxBiUC+qwmr 5uWNSBbAlHPL6kGpyydEHAGpkBlblakBqANZOaL1w/qRLeuBIJ XV5g0dsevLx/b4Q/6KRkYtPoD/lpqzzYQbwpQ7YhEMBGN4MRDu CZtKU1OkFVzgGkis0ciyE+6og2JJbXRQepRbDKhZNNsS6XKWAz fTCr5ls4ep2QeNvJpxSZ/5rkOk5j7vRvVrW1Pq6HDRxX98hEVg wodKSpnQpdJ/VQ+L1w/EZ1Fw1nuZEDtLgnQDA9Cyv X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-11-06 16:15:15 -0500, Tom Lane wrote: > "Paragon Corporation" 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs