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 1iJFiH-0006tM-B6 for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2019 11:37:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iJFhI-000175-6K for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2019 11:36:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJFhH-00016q-OV for pgsql-general@lists.postgresql.org; Sat, 12 Oct 2019 11:36:31 +0000 Received: from post.visena.com ([46.226.10.50]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJFhF-0000jW-Ay for pgsql-general@lists.postgresql.org; Sat, 12 Oct 2019 11:36:31 +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=MdDlXrtUyVm1otxlcWt1hWq82/p9hw87UVDz+yOf9aU=; b=F+XLAAN3CvzzfSTqcWTeGGoPAex47e0st9Nkd4NLn4gJhhRYPWegR2OAMYX5BMFGKeEPjTxG/yns5lwgMGtxYoRk90zmtXj2mVsyOXrUyC8smagbSLWxujvyhOU7uBFzl8XVjcJJMgwKGmv60rTcdpD4E0D5FW8w3mFW3q8Pe7Q=; 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 1iJFhA-0002cw-Di; Sat, 12 Oct 2019 13:36:26 +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 1iJFhA-0006EE-Bq; Sat, 12 Oct 2019 13:36:24 +0200 Date: Sat, 12 Oct 2019 13:36:24 +0200 (CEST) From: Andreas Joseph Krogh To: Andres Freund Cc: Tom Lane , pgsql-general@lists.postgresql.org Message-ID: In-Reply-To: <20191010202113.caxtj6sslxqpb7li@alap3.anarazel.de> Subject: Re: Segmentation fault with PG-12 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_105_461970617.1570880184232" 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_105_461970617.1570880184232 Content-Type: multipart/related; boundary="----=_Part_106_1860553872.1570880184232" ------=_Part_106_1860553872.1570880184232 Content-Type: multipart/alternative; boundary="----=_Part_107_2007049023.1570880184244" ------=_Part_107_2007049023.1570880184244 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 torsdag 10. oktober 2019 kl. 22:21:13, skrev Andres Freund < andres@anarazel.de >:=20 On 2019-10-10 15:32:38 -0400, Tom Lane wrote: > 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= =20 entity_id IN ($3)\nRETURNING entity_id" > >> And I'd bet that the root cause is something to do with Andres' tuple= =20 slot > >> 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. Cool, and thanks for checking.=20 No crashes in production after deploying the fix.=20 --=20 Andreas Joseph Krogh=20 ------=_Part_107_2007049023.1570880184244 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 torsdag 10. oktober 2019 kl. 22:21:13, skrev Andres Freund <= ;andres@anarazel.de>:
On = 2019-10-10 15:32:38 -0400, Tom Lane wrote:
> Andres 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 = evaluate
> >> 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 Andre= s' tuple slot
> >> work.=C2=A0 But (at least to my eye) it's not apparent exactl= y what's wrong.
>
> > It looks like this could "just" be another report of #1= 6036, 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 befor= e update trigger present.
>
> Bingo.=C2=A0 I can reproduce the crash (using concurrent updates of th= e same
> table row, in the schema Andreas sent off-list) on the predecessor of<= br> > that commit, but on that commit it's fine.

Cool, and thanks for checking.
=C2=A0
=C2=A0
No crashes in production after deploying the fix.
=C2=A0
">
--
Andreas Joseph Krogh
=C2=A0
------=_Part_107_2007049023.1570880184244-- ------=_Part_106_1860553872.1570880184232-- ------=_Part_105_461970617.1570880184232--