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 1ixaII-0001Lj-1c for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Jan 2020 17:41:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixaIG-00062S-GS for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Jan 2020 17:41:24 +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 1ixaIG-00062L-4g for pgsql-bugs@lists.postgresql.org; Fri, 31 Jan 2020 17:41:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixaID-00081T-FO for pgsql-bugs@lists.postgresql.org; Fri, 31 Jan 2020 17:41:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00VHfIkV011318; Fri, 31 Jan 2020 12:41:18 -0500 From: Tom Lane To: =?UTF-8?Q?Piotr_W=C5=82odarczyk?= cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16184: Segmentation Fault during update In-reply-to: References: <16184-2f718844be10c863@postgresql.org> <17312.1577979195@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?Q?Piotr_W=C5=82odarczyk?= message dated "Fri, 31 Jan 2020 13:59:11 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11316.1580492478.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 31 Jan 2020 12:41:18 -0500 Message-ID: <11317.1580492478@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?Q?Piotr_W=3DC5=3D82odarczyk?=3D wr= ites: > sorry for the late reply, but it was not so easy to get more logs. So wh= at > we have now is listed below: > (gdb) bt > #0 0x0000000000616912 in EvalPlanQualBegin (epqstate=3Depqstate@entry=3D= 0x2ae9520) > at execMain.c:2735 > #1 0x0000000000616cfb in EvalPlanQual (epqstate=3Depqstate@entry=3D0x2a= e9520, > relation=3Drelation@entry=3D0x7f694c76f838, rti=3D14, > inputslot=3Dinputslot@entry=3D0x31bc408) > at execMain.c:2454 > #2 0x0000000000638bdf in ExecUpdate (mtstate=3Dmtstate@entry=3D0x2ae942= 8, > tupleid=3D0x7ffc94e3cf40, oldtuple=3D0x0, slot=3D, > planSlot=3D0x312fc28, epqstate=3Depqstate@entry=3D0x2ae9520, > estate=3Destate@entry=3D0x2aff450, > canSetTag=3Dtrue) at nodeModifyTable.c:1387 > #3 0x000000000063914d in ExecModifyTable (pstate=3D0x2ae9428) at > nodeModifyTable.c:2223 OK, so that confirms my suspicion that it was an EvalPlanQual issue (hence, you need concurrent updates on the same row to trigger it). I believe this might be the same bug we isolated and fixed just a couple of days ago: https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3D8= 7fed2a197abc1397b63ee74b3fa7eb20471fff5 The stack trace looks the same as what Oleksii showed in that thread for a non-assert build. As far as I know, that bug only triggers if a single ModifyTable plan node has to run EPQ checks for more than one target table --- so, is this query updating a partitioned table or inheritance tree, and is it plausible that it had to update rows in more than one sub-table, and that some other transaction(s) were concurrently updating those same rows? regards, tom lane