Wrong results from Parallel Hash Full Join - Mailing list pgsql-hackers

From Richard Guo
Subject Wrong results from Parallel Hash Full Join
Date
Msg-id CAMbWs48Nde1Mv=BJv6_vXmRKHMuHZm2Q_g4F6Z3_pn+3EV6BGQ@mail.gmail.com
Whole thread Raw
Responses Re: Wrong results from Parallel Hash Full Join
List pgsql-hackers
I came across $subject and reduced the repro query as below.

create table a (i int);
create table b (i int);
insert into a values (1);
insert into b values (2);
update b set i = 2;

set min_parallel_table_scan_size to 0;
set parallel_tuple_cost to 0;
set parallel_setup_cost to 0;

# explain (costs off) select * from a full join b on a.i = b.i;
                QUERY PLAN
------------------------------------------
 Gather
   Workers Planned: 2
   ->  Parallel Hash Full Join
         Hash Cond: (a.i = b.i)
         ->  Parallel Seq Scan on a
         ->  Parallel Hash
               ->  Parallel Seq Scan on b
(7 rows)

# select * from a full join b on a.i = b.i;
 i | i
---+---
 1 |
(1 row)

Tuple (NULL, 2) is missing from the results.

Thanks
Richard

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Support logical replication of DDLs
Next
From: David Rowley
Date:
Subject: Re: [BUG #17888] Incorrect memory access in gist__int_ops for an input array with many elements