Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIeP1-0001KG-Vx for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 19:47:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIeP0-0007lx-0D for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 19:47:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIeOz-0007la-En for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 19:47:09 +0000 Received: from post.visena.com ([46.226.10.50]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.92) (envelope-from ) id 1iIeOw-00044e-G7 for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 19:47:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=visena.com; s=20141101.wh; h=Content-Type:MIME-Version:Subject:In-Reply-To:Message-ID:Cc:To:From:Date; bh=WMRRQICr4muIA2gY2DHsngXWdSKYFcaVUcfHrBrKo28=; b=hpFdNMTn/sC8WEYEi3veaqSoV+QxEmSp71KFkgtf7bs0o+P8jKIpTUmRR5jjfAkppSFrQLNNNHF/U3CwY1UqPuGPQRFzeuvB5AN9xEjvifeGajSQv6BiyBaso6UJT/olPsLMUDjIVvs0IHcleRHVG/g1o0Vbm2BzTBR11Dtot5g=; Received: from [10.0.1.10] (helo=tc7-visena.wh.internal.visena.com) by post.visena.com with esmtp (Exim 4.82) (envelope-from ) id 1iIeOq-0005rN-8O; Thu, 10 Oct 2019 21:47:02 +0200 Received: from localhost ([127.0.0.1] helo=tc7-visena.wh.internal.visena.com) by tc7-visena.wh.internal.visena.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iIeOq-00020a-68; Thu, 10 Oct 2019 21:47:00 +0200 Date: Thu, 10 Oct 2019 21:46:59 +0200 (CEST) From: Andreas Joseph Krogh To: Tom Lane Cc: Andres Freund , pgsql-general@lists.postgresql.org Message-ID: In-Reply-To: <22776.1570735958@sss.pgh.pa.us> Subject: Re: Segmentation fault with PG-12 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5_1351101082.1570736819861" X-Mailer: Visena Mail 2.2.143 X-Spam-Score: -1.0 X-Spam-Report: SpamAssasin (score=-1.0, required 5.0 ALL_TRUSTED=-1,HTML_MESSAGE=0.001) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_5_1351101082.1570736819861 Content-Type: multipart/related; boundary="----=_Part_6_1416534973.1570736819861" ------=_Part_6_1416534973.1570736819861 Content-Type: multipart/alternative; boundary="----=_Part_7_70066008.1570736819876" ------=_Part_7_70066008.1570736819876 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 torsdag 10. oktober 2019 kl. 21:32:38, skrev Tom Lane >:=20 Andres Freund writes: > On 2019-10-09 10:16:37 -0400, Tom Lane wrote: >> Well, it shows that the failure is occurring while trying to evaluate >> a variable in a trigger's WHEN clause during >> "UPDATE origo_email_delivery SET folder_id=3D$1, created=3D$2\nWHERE en= tity_id=20 IN ($3)\nRETURNING entity_id" >> And I'd bet that the root cause is something to do with Andres' tuple s= lot >> work. But (at least to my eye) it's not apparent exactly what's wrong. > It looks like this could "just" be another report of #16036, which was > already fixed in: > commit d986d4e87f61c68f52c68ebc274960dc664b7b4e > Author: Andres Freund > Date: 2019-10-04 11:59:34 -0700 > Fix crash caused by EPQ happening with a before update trigger present. Bingo. I can reproduce the crash (using concurrent updates of the same table row, in the schema Andreas sent off-list) on the predecessor of that commit, but on that commit it's fine.=20 That's great!=20 Andreas, that's a pretty simple patch if you're in a position to build from source ... regards, tom lane=20 Yes, we've built a new .deb-package from=20 f224c7c11ea7be2751e3342e11317070ffb5622d in REL_12_STABLE which we'll deplo= y=20 tonight.=20 Thanks!=20 --=20 Andreas Joseph Krogh=20 ------=_Part_7_70066008.1570736819876 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 torsdag 10. oktober 2019 kl. 21:32:38, skrev Tom Lane <tgl@sss.pgh.pa.us>:
And= res Freund <andres@anarazel.de> writes:
> On 2019-10-09 10:16:37 -0400, Tom Lane wrote:
>> Well, it shows that the failure is occurring while trying to evalu= ate
>> a variable in a trigger's WHEN clause during
>> "UPDATE origo_email_delivery SET folder_id=3D$1, created=3D$2= \nWHERE entity_id IN ($3)\nRETURNING entity_id"
>> And I'd bet that the root cause is something to do with Andres' tu= ple slot
>> work.=C2=A0 But (at least to my eye) it's not apparent exactly wha= t's wrong.

> It looks like this could "just" be another report of #16036,= which was
> already fixed in:
> commit d986d4e87f61c68f52c68ebc274960dc664b7b4e
> Author: Andres Freund <andres@anarazel.de>
> Date:=C2=A0 =C2=A02019-10-04 11:59:34 -0700
>=C2=A0 =C2=A0 =C2=A0Fix crash caused by EPQ happening with a before upd= ate trigger present.

Bingo.=C2=A0 I can reproduce the crash (using concurrent updates of the sam= e
table row, in the schema Andreas sent off-list) on the predecessor of
that commit, but on that commit it's fine.
=C2= =A0
=C2= =A0
Tha= t's great!
=C2= =A0
=C2= =A0
And= reas, that's a pretty simple patch if you're in a position to
build from source ...

regards, tom lane
=C2=A0
=C2=A0
Yes, we've built a new .deb-package from f224c7c11ea7be2751e3342e11317= 070ffb5622d in REL_12_STABLE which we'll deploy tonight.
Thanks!
=C2=A0
">
--
Andreas Joseph Krogh
=E2=80=8B
------=_Part_7_70066008.1570736819876-- ------=_Part_6_1416534973.1570736819861-- ------=_Part_5_1351101082.1570736819861--