Re: SIREAD lock versus ACCESS EXCLUSIVE lock

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: <simon(at)2ndquadrant(dot)com>,<drkp(at)csail(dot)mit(dot)edu>, <pgsql-hackers(at)postgresql(dot)org>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: SIREAD lock versus ACCESS EXCLUSIVE lock
Date: 2011-06-07 18:10:06
Message-ID: 4DEE232E020000250003E289@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> Predicate locks on indexes are only needed to lock key ranges, to
> notice later insertions into the range, right? For locks on tuples
> that do exist, we have locks on the heap. If we're just about to
> delete every tuple in the heap, that doesn't need to conflict with
> any locks on indexes, because we're deleting, not inserting. So I
> don't think we need to care about index locks here at all, only
> locks on the heap. Am I missing something?

You're right again. My brain must be turning to mush. This
function can also become simpler, and there is now no reason at all
to add catalog cache lookups to predicate.c. I think that leaves me
with all the answers I need to get a new patch out this evening
(U.S. Central Time).

Thanks,

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2011-06-07 18:12:20 Re: [Pgbuildfarm-members] CREATE FUNCTION hang on test machine polecat on HEAD
Previous Message Tom Lane 2011-06-07 18:10:05 Re: SIREAD lock versus ACCESS EXCLUSIVE lock