Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries - Mailing list pgsql-bugs

From Andrei Lepikhov
Subject Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries
Date
Msg-id ee0d17cc-240a-44bf-acad-58790efb0153@postgrespro.ru
Whole thread Raw
In response to Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries  (Alexander Korotkov <aekorotkov@gmail.com>)
Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
On 2/1/2024 15:02, Alexander Korotkov wrote:
> On Thu, Dec 28, 2023 at 6:32 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd say that that will break the cases rinfo_serial was introduced for.
>> Now, I certainly don't love rinfo_serial and would be happier if we
>> could do without it, but getting rid of it is another research project.
> 
> It's a pity that no regression tests detect that.  The attached patch
> implements the special comparison function, which ignores the
> 'rinfo_serial' field.  This avoids marking 'rinfo_serial' as
> pg_node_attr(equal_ignore).
I've reviewed this patch, and it seems okay. It was a real blunder in 
our understanding of clauses; thanks to all for pointing this out and 
fixing it.
The regression test shows where two fully equal join clauses, applied on 
different join levels, differ by the only required_relids. It covers the 
problem and can be helpful by itself. IMO, one line in this test is 
redundant (see attachment).
The comment on the patch looks okay. But assuming required_relids and 
clause fields of two RestrinctInfos are equal, I can't imagine a 
situation to have different is_pushed_down and incompatible_relids. Is 
it really possible?

-- 
regards,
Andrei Lepikhov
Postgres Professional

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: BUG #18267: Logical replication bug: data is not synchronized after Alter Publication.