@@ -3684,18 +3684,17 @@ create table listp_12_2 partition of listp_12 for values in(2);
3684
3684
alter table listp_12_1 set (parallel_workers = 0);
3685
3685
-- Ensure that listp_12_2 is not scanned. (The nested Append is not seen in
3686
3686
-- the plan as it's pulled in setref.c due to having just a single subnode).
3687
- explain (analyze on, costs off, timing off, summary off)
3688
- select * from listp where a = (select 1);
3689
- QUERY PLAN
3687
+ select explain_parallel_append('select * from listp where a = (select 1);');
3688
+ explain_parallel_append
3690
3689
----------------------------------------------------------------------
3691
- Gather (actual rows=0 loops=1 )
3690
+ Gather (actual rows=N loops=N )
3692
3691
Workers Planned: 2
3693
3692
Params Evaluated: $0
3694
- Workers Launched: 2
3693
+ Workers Launched: N
3695
3694
InitPlan 1 (returns $0)
3696
- -> Result (actual rows=1 loops=1 )
3697
- -> Parallel Append (actual rows=0 loops=3 )
3698
- -> Seq Scan on listp_12_1 listp_1 (actual rows=0 loops=1 )
3695
+ -> Result (actual rows=N loops=N )
3696
+ -> Parallel Append (actual rows=N loops=N )
3697
+ -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N )
3699
3698
Filter: (a = $0)
3700
3699
-> Parallel Seq Scan on listp_12_2 listp_2 (never executed)
3701
3700
Filter: (a = $0)
@@ -3704,34 +3703,34 @@ select * from listp where a = (select 1);
3704
3703
-- Like the above but throw some more complexity at the planner by adding
3705
3704
-- a UNION ALL. We expect both sides of the union not to scan the
3706
3705
-- non-required partitions.
3707
- explain (analyze on, costs off, timing off, summary off)
3708
- select * from listp where a = (select 1)
3706
+ select explain_parallel_append(
3707
+ ' select * from listp where a = (select 1)
3709
3708
union all
3710
- select * from listp where a = (select 2);
3711
- QUERY PLAN
3709
+ select * from listp where a = (select 2);');
3710
+ explain_parallel_append
3712
3711
-----------------------------------------------------------------------------------
3713
- Append (actual rows=0 loops=1 )
3714
- -> Gather (actual rows=0 loops=1 )
3712
+ Append (actual rows=N loops=N )
3713
+ -> Gather (actual rows=N loops=N )
3715
3714
Workers Planned: 2
3716
3715
Params Evaluated: $0
3717
- Workers Launched: 2
3716
+ Workers Launched: N
3718
3717
InitPlan 1 (returns $0)
3719
- -> Result (actual rows=1 loops=1 )
3720
- -> Parallel Append (actual rows=0 loops=3 )
3721
- -> Seq Scan on listp_12_1 listp_1 (actual rows=0 loops=1 )
3718
+ -> Result (actual rows=N loops=N )
3719
+ -> Parallel Append (actual rows=N loops=N )
3720
+ -> Seq Scan on listp_12_1 listp_1 (actual rows=N loops=N )
3722
3721
Filter: (a = $0)
3723
3722
-> Parallel Seq Scan on listp_12_2 listp_2 (never executed)
3724
3723
Filter: (a = $0)
3725
- -> Gather (actual rows=0 loops=1 )
3724
+ -> Gather (actual rows=N loops=N )
3726
3725
Workers Planned: 2
3727
3726
Params Evaluated: $1
3728
- Workers Launched: 2
3727
+ Workers Launched: N
3729
3728
InitPlan 2 (returns $1)
3730
- -> Result (actual rows=1 loops=1 )
3731
- -> Parallel Append (actual rows=0 loops=3 )
3729
+ -> Result (actual rows=N loops=N )
3730
+ -> Parallel Append (actual rows=N loops=N )
3732
3731
-> Seq Scan on listp_12_1 listp_4 (never executed)
3733
3732
Filter: (a = $1)
3734
- -> Parallel Seq Scan on listp_12_2 listp_5 (actual rows=0 loops=1 )
3733
+ -> Parallel Seq Scan on listp_12_2 listp_5 (actual rows=N loops=N )
3735
3734
Filter: (a = $1)
3736
3735
(23 rows)
3737
3736
0 commit comments