From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Killing off removed rels properly
Date: Mon, 13 Feb 2023 13:39:13 -0500
Message-ID: <1343881.1676313553@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs4_zhe22XqurMdcTx0PpSovHnCJSii3LXiutF_Hpdb9bxg@mail.gmail.com>
References: <229905.1676062220@sss.pgh.pa.us>
<CAMbWs4_zhe22XqurMdcTx0PpSovHnCJSii3LXiutF_Hpdb9bxg@mail.gmail.com>
Richard Guo <guofenglinux@gmail.com> writes:
> On Sat, Feb 11, 2023 at 4:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think it's time to clean this up by removing the rel from the
>> planner data structures altogether. The attached passes check-world,
>> and if it does trigger any problems I would say that's a clear
>> sign of bugs elsewhere.
> +1. The patch looks good to me.
Pushed, thanks for looking at it!
> One minor comment is that we should
> also remove the comments about RELOPT_DEADREL in pathnodes.h.
Yeah, I noticed that shortly after posting the patch :-(. Searching
the optimizer code for other references to "dead" rels turned up another
place where the comments need fixed, namely match_foreign_keys_to_quals
... which is someplace I should have thought to check before, given the
reference to it in remove_rel_from_query. Its code is fine as-is though.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com
Subject: Re: Killing off removed rels properly
In-Reply-To: <1343881.1676313553@sss.pgh.pa.us>
References: <229905.1676062220@sss.pgh.pa.us> <CAMbWs4_zhe22XqurMdcTx0PpSovHnCJSii3LXiutF_Hpdb9bxg@mail.gmail.com> <1343881.1676313553@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox