Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDtEe-0008Ui-Ek for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2020 17:41:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDtEd-0006w1-ET for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Sep 2020 17:41:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDtEc-0006vu-Rg for pgsql-bugs@lists.postgresql.org; Thu, 03 Sep 2020 17:41:19 +0000 Received: from mail.dalibo.com ([212.85.157.172]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDtEa-0000vW-HI for pgsql-bugs@lists.postgresql.org; Thu, 03 Sep 2020 17:41:18 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 190D02046B; Thu, 3 Sep 2020 19:41:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1599154875; bh=6tQNfTA1Ra2I3TdBBqKrQoFyemlmmPto8fsXwcaV2wU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iDUWu/082vPKus5zzZiuLblxI1xzwnWFZcPkPyXk/W2oiaWswtMswWfC4GuoLZUsh om3czwTIdIRgqublYovEolt/e8x3jOkB0HXGW9PXjqdhXAfc4S9yLzkHKcjx3jU649 OZVv1Z25Jo1kKUIGHZbHs0Q97fcUqI7nbcflmmE8= Date: Thu, 3 Sep 2020 19:41:14 +0200 From: Jehan-Guillaume de Rorthais To: Alvaro Herrera Cc: pgsql-bugs@lists.postgresql.org Subject: Re: [BUG v13] Crash with event trigger in extension Message-ID: <20200903194114.34af669a@firost> In-Reply-To: <20200902175328.GA21242@alvherre.pgsql> References: <20200902193715.6e0269d4@firost> <20200902175328.GA21242@alvherre.pgsql> Organization: Dalibo MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/G27DIj1ZIcAkW5m118ue3TH" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --MP_/G27DIj1ZIcAkW5m118ue3TH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, 2 Sep 2020 13:53:28 -0400 Alvaro Herrera wrote: > On 2020-Sep-02, Jehan-Guillaume de Rorthais wrote: > > > Hi, > > > > Philippe Beaudoin reported to me a crash he was able to reproduce with some > > extension update script. Please, find in attachment a script that triggers > > it. Just edit the three first vars to point to a temporary installation and > > instance. > > > > Some git bisect shows the bug was introduced by b5810de3f4, where > > multi-statement query strings are using different short memory contexts. > > Good find. > > I think we should turn your case into a proper TAP test so that we can > incorporate it, for coverage -- the lines you patch do appear covered, > but obviously not in these specific conditions. I'm just not very sure > *where* to add it; maybe src/test/modules/test_extensions is the place > to have it, though that one doesn't have TAP tests currently. An easy > addition, though. Sure, please find in attachment patch v2 adding a regression test. Regards, --MP_/G27DIj1ZIcAkW5m118ue3TH Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=v2-0001-Fix-crash-with-alter-table-event-triggers-in-extensi.patch