Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8Vgk-0001PX-0N for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Nov 2016 17:13:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c8Vgi-00064w-PD for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Nov 2016 17:13:56 +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 1c8Vgg-00064e-UN for pgsql-hackers@postgresql.org; Sun, 20 Nov 2016 17:13:54 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1c8VgZ-0007YD-Hw for pgsql-hackers@postgresql.org; Sun, 20 Nov 2016 17:13:54 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 3D0D81B4009; Sun, 20 Nov 2016 18:13:45 +0100 (CET) Received: from ex (ip-109-44-0-167.web.vodafone.de [109.44.0.167]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ase@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id D1A7C1B4008 for ; Sun, 20 Nov 2016 18:13:43 +0100 (CET) From: Andreas Seltenreich To: pgsql-hackers@postgresql.org Subject: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan Date: Sun, 20 Nov 2016 18:13:42 +0100 Message-ID: <8737im6pmh.fsf@credativ.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-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, the query below triggers a parallel worker assertion for me when run on the regression database of master as of 0832f2d. The plan sports a couple of InitPlan nodes below Gather. regards, Andreas Gather (cost=1.64..84.29 rows=128 width=4) Workers Planned: 1 Single Copy: true -> Limit (cost=1.64..84.29 rows=128 width=4) -> Subquery Scan on subq_0 (cost=1.64..451.06 rows=696 width=4) Filter: (subq_0.c6 IS NOT NULL) -> Nested Loop Left Join (cost=1.64..444.07 rows=699 width=145) Join Filter: (sample_0.aa = sample_1.pageno) InitPlan 4 (returns $3) -> Result (cost=1.21..5.36 rows=15 width=0) One-Time Filter: ($0 AND ($1 = $2)) InitPlan 1 (returns $0) -> Result (cost=0.00..0.00 rows=0 width=0) One-Time Filter: false InitPlan 2 (returns $1) -> Limit (cost=0.35..0.52 rows=1 width=4) -> Gather (cost=0.00..1.04 rows=6 width=4) Workers Planned: 1 -> Parallel Seq Scan on reltime_tbl (cost=0.00..1.04 rows=4 width=4) InitPlan 3 (returns $2) -> Limit (cost=0.52..0.69 rows=1 width=4) -> Gather (cost=0.00..1.04 rows=6 width=4) Workers Planned: 1 -> Parallel Seq Scan on reltime_tbl reltime_tbl_1 (cost=0.00..1.04 rows=4 width=4) -> Sample Scan on pg_foreign_data_wrapper sample_2 (cost=1.21..5.36 rows=15 width=0) Sampling: system ('3.1'::real) -> Nested Loop (cost=0.15..382.85 rows=699 width=4) -> Sample Scan on pg_largeobject sample_1 (cost=0.00..209.03 rows=699 width=8) Sampling: bernoulli ('2.9'::real) Filter: (pageno IS NOT NULL) -> Index Only Scan using pg_foreign_table_relid_index on pg_foreign_table ref_0 (cost=0.15..0.24 rows=1 width=4) Index Cond: (ftrelid = sample_1.loid) -> Materialize (cost=0.00..16.06 rows=4 width=4) -> Append (cost=0.00..16.04 rows=4 width=4) -> Sample Scan on a sample_0 (cost=0.00..4.01 rows=1 width=4) Sampling: system ('5'::real) -> Sample Scan on b sample_0_1 (cost=0.00..4.01 rows=1 width=4) Sampling: system ('5'::real) -> Sample Scan on c sample_0_2 (cost=0.00..4.01 rows=1 width=4) Sampling: system ('5'::real) -> Sample Scan on d sample_0_3 (cost=0.00..4.01 rows=1 width=4) Sampling: system ('5'::real) --8<---------------cut here---------------start------------->8--- set force_parallel_mode to on; set max_parallel_workers_per_gather to 2; select 91 as c0 from (select (select pfname from public.pslot limit 1 offset 3) as c0, ref_1.grandtot as c1, (select pg_catalog.min(procost) from pg_catalog.pg_proc) as c2, ref_0.ftoptions as c3, ref_1.grandtot as c4, sample_1.loid as c5, pg_catalog.pg_rotate_logfile() as c6, (select random from public.hash_i4_heap limit 1 offset 5) as c7, sample_1.loid as c8 from public.a as sample_0 tablesample system (5) right join pg_catalog.pg_largeobject as sample_1 tablesample bernoulli (2.9) inner join pg_catalog.pg_foreign_table as ref_0 on (sample_1.loid = ref_0.ftrelid ) on (sample_0.aa = sample_1.pageno ) left join public.mvtest_tvv as ref_1 on (EXISTS ( select sample_2.fdwoptions as c0, sample_2.fdwhandler as c1, (select during from public.test_range_excl limit 1 offset 89) as c2 from pg_catalog.pg_foreign_data_wrapper as sample_2 tablesample system (3.1) where (EXISTS ( select sample_3.b as c0, (select grantee from information_schema.udt_privileges limit 1 offset 4) as c1, sample_3.b as c2, sample_3.rf_a as c3, sample_3.b as c4, sample_3.rf_a as c5, sample_3.rf_a as c6 from public.clstr_tst_s as sample_3 tablesample system (8.1) where sample_3.rf_a >= cast(null as int8) limit 141)) and ((select f1 from public.reltime_tbl limit 1 offset 2) = (select f1 from public.reltime_tbl limit 1 offset 3) ) limit 49)) where sample_1.pageno is not NULL) as subq_0 where subq_0.c6 is not NULL limit 128; --8<---------------cut here---------------end--------------->8--- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers