Re: Correction of RowMark Removal During Sel-Join Elimination

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Correction of RowMark Removal During Sel-Join Elimination
Date: 2025-08-24 00:44:38
Message-ID: CAPpHfdsP_abX5hjnxiRJ6guU9P1FH4EdNTMksoGD05tTG1o9vA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Andrei!

On Tue, Aug 12, 2025 at 12:40 PM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
> On 11/8/2025 20:15, Greg Sabino Mullane wrote:
> > I'm not convinced this is an improvement from someone just coming in to
> > this part of the code, especially given (for example) the comment right
> > above it:
> >
> > * Determine if the inner table can duplicate outer rows. We must
> > * bypass the unique rel cache here since we're possibly using aThanks for your feedback.
> I made some minor adjustments to the comments to make the code more
> consistent. Sure, rrel and krel don't seem like the best solution - I
> guess natives could find less wordy synonyms than just dumb
> 'keeping_rel' and 'removing_rel'. But it is simpler to track which
> relation and RowMark should be removed.

Thank you for catching this. And thank you for the fix. I think it
worth separating fix and refactoring. This helps to understand what
exactly the fix is by looking at the patch. I also edited commit
message. I'm going to push this if no objections.

------
Regards,
Alexander Korotkov
Supabase

Attachment Content-Type Size
v2-0001-Refactor-variable-names-in-remove_self_joins_one_.patch application/octet-stream 5.1 KB
v2-0002-Improve-RowMark-handling-during-Self-Join-Elimina.patch application/octet-stream 4.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2025-08-24 01:08:11 Re: Non-text mode for pg_dumpall
Previous Message Noah Misch 2025-08-23 23:59:45 Re: Test instability when pg_dump orders by OID