Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XUOBM-0005Vy-DZ for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Sep 2014 22:58:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XUOBK-0000g5-KO for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Sep 2014 22:58:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XUOBJ-0000fy-Gt for pgsql-bugs@postgresql.org; Wed, 17 Sep 2014 22:58:37 +0000 Received: from mail-ig0-x22c.google.com ([2607:f8b0:4001:c05::22c]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XUOBC-0006aq-26 for pgsql-bugs@postgresql.org; Wed, 17 Sep 2014 22:58:35 +0000 Received: by mail-ig0-f172.google.com with SMTP id a13so458860igq.11 for ; Wed, 17 Sep 2014 15:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding:content-type; bh=U1o6Zp9zuiE/J5cr+DA095Xvq7Uifw+J/WQi5TLTNqA=; b=CDUkWFUSQeO4Z/sADYJ2HcwizdOc6YqYJdt26h4j2WseXA9VwBfNXonC3CpPb7TkI8 Brm3YSm5b6Ra2TOT/+u8G24NLnP/m3xVWcm12ldzVgiqGgR4/zY3WSLE+tBLHl/1C/cg 9XMtNonctwtymMAe0cJVUHSDvVdcOganzkm+mpFE7Y8zMTS2o0DJ3OhsVkhP3vKBj81F ibzNDQo0UEUsHQ/Nt4fVzk8sD7vL4E7MQmlzJv9ZkniSKjEpV7LObGUi8fp3pVUnHse6 cKJhAQwRu2wfI2AE5YJo/1BREXhY3WBNU38Lb5ACgMMIXLjGSiW0y8S0ELZaYR+ws6RF zvCg== X-Received: by 10.43.128.7 with SMTP id hc7mr8365277icc.63.1410994708891; Wed, 17 Sep 2014 15:58:28 -0700 (PDT) Received: from klinga.prans.org (hq.sprymix.net. [66.207.200.154]) by mx.google.com with ESMTPSA id ki5sm654305igb.2.2014.09.17.15.58.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 15:58:28 -0700 (PDT) From: Elvis Pranskevichus To: Tom Lane Cc: pgsql-bugs@postgresql.org Subject: Re: Assertion failure in get_appendrel_parampathinfo Date: Wed, 17 Sep 2014 18:58:26 -0400 Message-ID: <1525103.aHpcLfUgAm@klinga.prans.org> User-Agent: KMail/4.12.5 (Linux/3.16.1; KDE/4.12.5; x86_64; ; ) In-Reply-To: <5411.1410990634@sss.pgh.pa.us> References: <2326379.AOuSqtNClj@klinga.prans.org> <5411.1410990634@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Pg-Spam-Score: -2.0 (--) 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 Yeah, it crashes on debug build with asserts enabled when planning. In fact, it's possible to reproduce on a smaller query: EXPLAIN SELECT True FROM link INNER JOIN (SELECT id FROM b UNION ALL SELECT id FROM d) AS v ON (link.target = v.id); On non-debug build EXPLAIN works, but running it crashes in ExecEvalScalarVar: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000596dd5 in ExecEvalScalarVar () (gdb) bt #0 0x0000000000596dd5 in ExecEvalScalarVar () #1 0x00000000005a4f98 in ExecIndexEvalRuntimeKeys () #2 0x00000000005a66e8 in ExecReScanIndexOnlyScan () #3 0x000000000059057d in ExecReScan () #4 0x00000000005a66a5 in ExecIndexOnlyScan () #5 0x0000000000594498 in ExecProcNode () #6 0x000000000059f57f in ExecAppend () #7 0x00000000005944e8 in ExecProcNode () #8 0x00000000005aab87 in ExecNestLoop () #9 0x0000000000594408 in ExecProcNode () #10 0x0000000000591aa0 in standard_ExecutorRun () #11 0x0000000000678aa8 in PortalRunSelect () #12 0x0000000000679e2f in PortalRun () #13 0x0000000000677bc3 in PostgresMain () #14 0x000000000046adef in main () Elvis On September 17, 2014 02:50:34 PM Tom Lane wrote: > Elvis Pranskevichus writes: > > Postgres 9.4beta2 and later crashes given the following query: > Thanks for the test case. Reproduces for me in HEAD, will > look into it later. > > > Which generates the following query plan: > I'm a bit confused about your statement that it produces this > query plan, since AFAICS it crashes before getting that far. > > regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs