public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
To: Melanie Plageman <[email protected]>
Cc: Richard Guo <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Wrong results from Parallel Hash Full Join
Date: Wed, 12 Apr 2023 11:14:52 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAKRu_aaaGtjJK5Jt2NKbs-X2v9md-sW8em7kzMHpwZstrLT-w@mail.gmail.com>
References: <CAMbWs48Nde1Mv=BJv6_vXmRKHMuHZm2Q_g4F6Z3_pn+3EV6BGQ@mail.gmail.com>
<CAAKRu_aaaGtjJK5Jt2NKbs-X2v9md-sW8em7kzMHpwZstrLT-w@mail.gmail.com>
Hi,
On 2023-04-12 10:57:17 -0400, Melanie Plageman wrote:
> HeapTupleHeaderHasMatch() checks if HEAP_TUPLE_HAS_MATCH is set.
>
> In htup_details.h, you will see that HEAP_TUPLE_HAS_MATCH is defined as
> HEAP_ONLY_TUPLE
> /*
> * HEAP_TUPLE_HAS_MATCH is a temporary flag used during hash joins. It is
> * only used in tuples that are in the hash table, and those don't need
> * any visibility information, so we can overlay it on a visibility flag
> * instead of using up a dedicated bit.
> */
> #define HEAP_TUPLE_HAS_MATCH HEAP_ONLY_TUPLE /* tuple has a join match */
>
> If you redefine HEAP_TUPLE_HAS_MATCH as something that isn't already
> used, say 0x1800, the query returns correct results.
> [...]
> The question is, why does this only happen for a parallel full hash join?
I'd guess that PHJ code is missing a HeapTupleHeaderClearMatch() somewhere,
but the non-parallel case isn't.
Greetings,
Andres Freund
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Wrong results from Parallel Hash Full Join
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox