Re: HOT patch - version 14 - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: HOT patch - version 14
Date
Msg-id 20070830221649.GZ5872@alvh.no-ip.org
Whole thread Raw
In response to Re: HOT patch - version 14  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: HOT patch - version 14
List pgsql-patches
Tom Lane escribió:
> "Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> > On 8/30/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> I don't think that works --- what if the last tuple in the chain isn't
> >> committed good yet?  If its inserter ultimately rolls back, you've
> >> indexed the wrong value.
>
> > I am confused. How could we get ShareLock on the relation while
> > there is some open transaction which has inserted a tuple in the
> > table ? (Of course, I am not considering the system tables here)
>
> Not if someone else releases lock before committing.

FWIW, a red flag raised for me here, though maybe it is irrelevant or
unimportant.  Currently, VACUUM acquires an exclusive lock for
truncating the table.  The lock is kept till commit.  However I am
proposing that it be released before commit.

Now, VACUUM never inserts rows.  But I don't claim I understand what's
going on here.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: HOT patch - version 14
Next
From: Tom Lane
Date:
Subject: Re: HOT patch - version 14