public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: Richard Guo <[email protected]>
To: Pg Hackers <[email protected]>
Subject: Re: The bogus calls in remove_self_join_rel()
Date: Thu, 23 Apr 2026 10:11:06 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMbWs49fYQcqJfJ_Gtn8r1GFNoYtb1=2AUab4ieuqY4Zid9ocQ@mail.gmail.com>
References: <CAMbWs49fYQcqJfJ_Gtn8r1GFNoYtb1=2AUab4ieuqY4Zid9ocQ@mail.gmail.com>
On 23/04/2026 04:45, Richard Guo wrote:
> I noticed these two calls in remove_self_join_rel():
>
> adjust_relid_set(root->all_result_relids, toRemove->relid, toKeep->relid);
> adjust_relid_set(root->leaf_result_relids, toRemove->relid, toKeep->relid);
>
> There's no comment explaining them, and as far as I can tell they do
> nothing: adjust_relid_set returns a Relids and does not modify the
> input in place.
There is a clear history of these calls. When designing SJE, we initially
applied it to partitioned tables. Later, we realised complicated issues arise
when SJE meets DML, the RETURNING clause, and partitioned tables. So, we reduced
the feature for some time. I guess the core code's stability has been proven
enough by PG18. We may introduce SJE over partitioned tables in the next release.
You can probably remove these calls for now. Just make sure to add assertions to
help with developing the partitioned case.
--
regards, Andrei Lepikhov,
pgEdge
view thread (4+ 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: The bogus calls in remove_self_join_rel()
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