From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Kevin Grittner <kgrittn(at)gmail(dot)com> |
Subject: | Re: An out-of-date comment in nodeIndexonlyscan.c |
Date: | 2019-06-27 23:32:45 |
Message-ID: | CA+hUKGJi8SNv02ymFnY8k8g=podH8mOJb=yK4KPw7hyQ0nZkaw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 8, 2019 at 4:58 AM Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Thu, May 17, 2018 at 3:49 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> > On 14/05/18 02:15, Thomas Munro wrote:
> > > The first sentence of that comment is no longer true as of commit
> > > c01262a8 (2013). As for whether it's necessary to predicate-lock the
> > > whole eheap page (rather than the heap tuple) anyway because of HOT
> > > update chains, I don't know, so I'm not sure what wording to propose
> > > instead.
> >
> > Hmm. If there are any updated tuples, HOT or not, the visibility map bit
> > will not be set, and we won't reach this code. So I think we could
> > acquire the tuple lock here.
>
> Right. CC Kevin. I think we should at least fix the comment. As for
> changing the lock level, PredicateLockTuple() wants a heap tuple that
> we don't have, so we'd probably need to add a PredicateLockTid()
> function.
Here's a patch I'd like to commit to fix the comment. We could look
at improving the actual code after
https://commitfest.postgresql.org/23/2169/ is done.
I wonder if it might be possible to avoid page locks on both the heap
*and* index in some limited cases, as I mentioned over here (just an
idea, could be way off base):
--
Thomas Munro
https://enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-misleading-comment-in-nodeIndexonlyscan.c.patch | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2019-06-28 00:33:58 | Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) |
Previous Message | Justin Pryzby | 2019-06-27 23:02:02 | Re: make \d pg_toast.foo show its indices ; and, \d toast show its main table ; and \d relkind=I show its partitions (and tablespace) |