From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Killing off removed rels properly |
Date: | 2023-02-13 18:39:13 |
Message-ID: | 1343881.1676313553@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> On Sat, Feb 11, 2023 at 4:50 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-02-13 18:42:02 | Adding "large" to PG_TEST_EXTRA |
Previous Message | Alvaro Herrera | 2023-02-13 18:33:07 | Re: ERROR: permission info at index 1 .... |