From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | 253540651(at)qq(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17151: A SEGV in optimizer |
Date: | 2021-08-18 23:24:20 |
Message-ID: | 1663590.1629329060@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I wrote:
> (This passes check-world, but I've not double-checked to make sure
> that inFromCl will be set in exactly the cases we want.)
After studying the code a bit more, I remembered why my hindbrain
was feeling uncomfortable about that coding: parsenodes.h says that
inFromCl is quasi-deprecated and not used anymore during parsing.
However, we can't really use the ParseNamespaceItem data structure
for this purpose, because baserels should be available to lock
whether or not they are visible according to join aliasing rules.
I don't see a lot of point to inventing some complicated add-on
for this when inFromCl will serve fine. So I think we should just
adjust the relevant comments, say like the attached.
We probably need some regression test cases added (I wonder whether
FOR UPDATE in rule actions is covered at all ATM). Otherwise
I feel like this is OK to commit.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
dont-lock-OLD-and-NEW-2.patch | text/x-diff | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2021-08-19 01:02:44 | Re: BUG #17151: A SEGV in optimizer |
Previous Message | Tom Lane | 2021-08-18 22:32:05 | Re: BUG #17152: ERROR: AddressSanitizer: SEGV on unknown address |