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 1kE8A3-0004HI-EZ for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Sep 2020 09:37:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kE8A2-0002sH-Dt for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Sep 2020 09:37:34 +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 1kE8A1-0002sA-Vs for pgsql-bugs@lists.postgresql.org; Fri, 04 Sep 2020 09:37:34 +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 1kE89z-0001m2-4R for pgsql-bugs@lists.postgresql.org; Fri, 04 Sep 2020 09:37:33 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 38171204D4; Fri, 4 Sep 2020 11:37:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1599212249; bh=53Z3NYtu0NCBDqTJck9KeMcfAq8g/DU3+GUKho3i8pw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RSHnsT9caiLnKT88Fw/ScQVjG2wGzE7xZhFOkwAGyVmDGV+zZU9Axng4Z1ef1oj2s R5NOCoJ3Un+5VsQTpJBHFMd9KNhj2z7Els6fxx9UErIkrMyGauoQfjRwqpezCFvcWW th6clbxh2zsmIxysvKo8hLSAc5KlLLFjiZueS2HE= Date: Fri, 4 Sep 2020 11:37:28 +0200 From: Jehan-Guillaume de Rorthais To: Michael Paquier Cc: Alvaro Herrera , pgsql-bugs@lists.postgresql.org Subject: Re: [BUG v13] Crash with event trigger in extension Message-ID: <20200904113728.2d4a44bb@firost> In-Reply-To: <20200904012013.GE19499@paquier.xyz> References: <20200902193715.6e0269d4@firost> <20200902175328.GA21242@alvherre.pgsql> <20200903194114.34af669a@firost> <20200904012013.GE19499@paquier.xyz> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 4 Sep 2020 10:20:13 +0900 Michael Paquier wrote: > On Thu, Sep 03, 2020 at 07:41:14PM +0200, Jehan-Guillaume de Rorthais wrote: > > +$node->safe_psql('postgres', > > + q{CREATE EXTENSION test_event_trigger VERSION '1.0'}); > > +$node->safe_psql('postgres', > > + q{ALTER EXTENSION test_event_trigger UPDATE TO '2.0'}); > > + > > +my $ans = $node->safe_psql('postgres', q{ > > + SELECT extversion > > + FROM pg_catalog.pg_extension > > + WHERE extname='test_event_trigger' > > +}); > > + > > +is($ans, '2.0', 'Extension test_event_trigger upgraded'); > > I may be missing something of course, but if this just tests a > sequence of SQL commands, why don't you just include a SQL test in > text_extensions/sql/? That would be much cheaper than having to > create a full scenario with a TAP script. Indeed, it's much more simple and cheaper. However, the result is a bit confusing as it's not a wrong SQL result, but the backend that actually crash. The crash message itself appears in results/test_extensions.out, but no other tests are run. Neither from the same SQL file or from other ones. That Means the diff is quite large, but the error appears close from the top. I don't know if some other crash regression tests has been included that way in the past. But if this is OK, I can append the test to sql/test_extensions.sql and remove the TAP. Let me know what you think. Regards,