Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1BG-0002qE-Ba for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Aug 2017 16:28:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1di1BF-0008Rb-UT for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Aug 2017 16:28:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1di1BF-0008RR-C8 for pgsql-bugs@postgresql.org; Wed, 16 Aug 2017 16:28:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1di1BC-0005Fb-KB for pgsql-bugs@postgresql.org; Wed, 16 Aug 2017 16:28:28 +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 v7GGSMDX027780; Wed, 16 Aug 2017 12:28:22 -0400 From: Tom Lane To: Maksim Karaba cc: "pgsql-bugs@postgresql.org" Subject: Re: BUG #14781: server process was terminated by signal 11: Segmentation fault In-reply-to: <3ae5f80b43914606a83b239c594027a9@EPBYMINSA0001.epam.com> References: <20170816113206.27368.44100@wrigleys.postgresql.org> <18665.1502891204@sss.pgh.pa.us> <5eaf3b7e1ee34fe3bd138cc5339011c1@EPBYMINSA0001.epam.com> <24096.1502896200@sss.pgh.pa.us> <3ae5f80b43914606a83b239c594027a9@EPBYMINSA0001.epam.com> Comments: In-reply-to Maksim Karaba message dated "Wed, 16 Aug 2017 15:45:35 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27778.1502900902.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 16 Aug 2017 12:28:22 -0400 Message-ID: <27779.1502900902@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Maksim Karaba writes: > Unfortunately we cannot reproduce this issue on other servers, only on pr= oduction system. > And we cannot provide internal database info, schema structure and tables= info. [ shrug... ] We may just have to wait for somebody to be more forthcoming. FWIW, the stack trace seems to indicate that an incorrect plan has been generated, ie one that has a remote join node without an EPQ recheck subplan. That mistake in itself is probably pretty deterministic. The reason you can't reproduce the crash easily is that the lack of a subplan only manifests as a crash if we enter the EPQ recheck code, and that only happens if the query tries to update a row that's just been updated by some concurrent query. So it's not going to crash except under concurrent load, which probably also explains why the bug wasn't found long ago. If you want to push this forward rather than wait for somebody else to hit the problem, you could try adding something like if (fsplan->scan.scanrelid =3D=3D 0 && outerPlanState(node) =3D=3D NULL && (estate->es_plannedstmt->commandType !=3D CMD_SELECT || estate->es_rowMarks)) elog(WARNING, "foreign join plan lacks EPQ support"); near the beginning of postgresBeginForeignScan and then running your app on a test server. I'm not sure offhand that the estate filters are exactly right, but any statement that produces this warning would be pretty suspect. At that point you could work on sanitizing the query + tables + test data to get to a publishable test case; you could probably boil your real query down quite a bit and still get the failure. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs