Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6JRL-0000NZ-8e for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Oct 2017 16:49:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e6JRK-0003LI-RP for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Oct 2017 16:49:30 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e6JRJ-0003Jm-HB for pgsql-hackers@postgresql.org; Sun, 22 Oct 2017 16:49:29 +0000 Received: from mout.gmx.net ([212.227.17.22]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e6JRG-0002vN-Ec for pgsql-hackers@postgresql.org; Sun, 22 Oct 2017 16:49:29 +0000 Received: from moll ([80.187.98.142]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MgbvP-1dsmn61oVL-00NwVf for ; Sun, 22 Oct 2017 18:49:23 +0200 From: Andreas Seltenreich To: pgsql-hackers@postgresql.org Subject: [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator X-PGP-Key: 4096R/803D1FFF 2015-02-04 Key fingerprint = 4758 81DC 8539 494D 29B4 692D F587 0601 803D 1FFF X-Now-Playing: In Sickness And Health - Downfall - The Early Years - Gathering Date: Sun, 22 Oct 2017 18:49:22 +0200 Message-ID: <87r2tvt9f1.fsf@ansel.ydns.eu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:uVVQaAY7ps20Fe+aaqC0kXrx2pFB84Y6sWTg3dCgbEGDi2EzyrF LTg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Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, testing master as of 7c981590c2, sqlsmith just triggered the following assertion: TRAP: FailedAssertion("!(!((((const Node*)(node))->type) == T_SubLink))", File: "prepunion.c", Line: 2231) I can reproduce it on a vanilla regression database with the following query: --8<---------------cut here---------------start------------->8--- explain delete from public.road where EXISTS ( select ref_1.tablename from public.renamecolumnchild as ref_0 right join pg_catalog.pg_policies as ref_1 on (true) where EXISTS ( select public.road.name as c1, ref_1.with_check as c3, ref_2.b as c6 from public.itest4 as ref_2)); --8<---------------cut here---------------end--------------->8--- Backtrace below. regards, Andreas Core was generated by `postgres: smith regression [local] DELETE '. Program terminated with signal SIGABRT, Aborted. #0 0x00007f70c2dacfcf in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f70c2dae3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x0000564d8ce587b3 in ExceptionalCondition (conditionName=conditionName@entry=0x564d8cfe87b0 "!(!((((const Node*)(node))->type) == T_SubLink))", errorType=errorType@entry=0x564d8cea483d "FailedAssertion", fileName=fileName@entry=0x564d8cfea866 "prepunion.c", lineNumber=lineNumber@entry=2231) at assert.c:54 #3 0x0000564d8ccaf7dc in adjust_appendrel_attrs_mutator (node=0x564d91e0d2a0, context=0x7fff0a33caa0) at prepunion.c:2231 #4 0x0000564d8cc4d8ef in expression_tree_mutator (node=0x564d91e0ccd8, mutator=0x564d8ccaf1d0 , context=0x7fff0a33caa0) at nodeFuncs.c:2554 #5 0x0000564d8cc4d88f in expression_tree_mutator (node=0x564d91e0df90, mutator=mutator@entry=0x564d8ccaf1d0 , context=context@entry=0x7fff0a33caa0) at nodeFuncs.c:3008 #6 0x0000564d8ccaf29f in adjust_appendrel_attrs_mutator (node=0x564d91e0df90, context=0x7fff0a33caa0) at prepunion.c:2151 #7 0x0000564d8cc4dafb in expression_tree_mutator (node=, mutator=0x564d8ccaf1d0 , context=0x7fff0a33caa0) at nodeFuncs.c:2903 #8 0x0000564d8cc4e589 in range_table_mutator (rtable=, mutator=mutator@entry=0x564d8ccaf1d0 , context=context@entry=0x7fff0a33caa0, flags=flags@entry=3) at nodeFuncs.c:3146 #9 0x0000564d8cc4e78e in query_tree_mutator (query=0x564d91e30c20, query@entry=0x564d90fbe090, mutator=mutator@entry=0x564d8ccaf1d0 , context=context@entry=0x7fff0a33caa0, flags=flags@entry=3) at nodeFuncs.c:3096 #10 0x0000564d8ccb1499 in adjust_appendrel_attrs (root=root@entry=0x564d910bab58, node=node@entry=0x564d90fbe090, nappinfos=nappinfos@entry=1, appinfos=appinfos@entry=0x7fff0a33cba8) at prepunion.c:1964 #11 0x0000564d8cca3406 in inheritance_planner (root=) at planner.c:1200 #12 subquery_planner (glob=glob@entry=0x564d910baac0, parse=parse@entry=0x564d90fbe090, parent_root=parent_root@entry=0x0, hasRecursion=hasRecursion@entry=0 '\000', tuple_fraction=tuple_fraction@entry=0) at planner.c:857 #13 0x0000564d8cca3dbf in standard_planner (parse=0x564d90fbe090, cursorOptions=256, boundParams=0x0) at planner.c:352 #14 0x0000564d8cd4ef5d in pg_plan_query (querytree=0x564d90fbe090, cursorOptions=256, boundParams=0x0) at postgres.c:807 #15 0x0000564d8cd4f03e in pg_plan_queries (querytrees=, cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0) at postgres.c:873 #16 0x0000564d8cd4f519 in exec_simple_query (query_string=0x564d8ed5c330 "[...]") at postgres.c:1048 #17 0x0000564d8cd51151 in PostgresMain (argc=, argv=argv@entry=0x564d8ed66c50, dbname=, username=) at postgres.c:4139 #18 0x0000564d8ca56032 in BackendRun (port=0x564d8ed6d460) at postmaster.c:4364 #19 BackendStartup (port=0x564d8ed6d460) at postmaster.c:4036 #20 ServerLoop () at postmaster.c:1755 #21 0x0000564d8ccd628c in PostmasterMain (argc=3, argv=0x564d8ed3c5a0) at postmaster.c:1363 #22 0x0000564d8ca5761d in main (argc=3, argv=0x564d8ed3c5a0) at main.c:228 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers