Re: remove lock protection on HeapTupleSatisfiesVacuum

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: remove lock protection on HeapTupleSatisfiesVacuum
Date: 2006-06-07 17:19:12
Message-ID: 20060607171912.GU45331@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Wed, Jun 07, 2006 at 09:34:47AM +0800, Qingqing Zhou wrote:
>
> "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> wrote
> >
> > The overall performance improvement might be marginal but why not if it is
> > right. What I cares is the correctness. As I understand, the orginal code
> > puts a shared lock (1) to prevent the vacuum process to move tuples around
> > so the hint bits change may happen in a wrong place; (2) to prevent other
> > operations holding EXCLUSIVE lock to change bits at the same time.
> >
>
> I realized I made an aweful mistake. The shared lock also (3) to prevent
> other operations holding EXCLUSIVE lock to change the xid fields at the
> same. So the final conclusion is: the original code is right and my patch is
> terriblly wrong :-(

Maybe a comment patch would be in order to prevent future confusion?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2006-06-07 18:14:44 ALTER TABLE ADD/DROP INHERITS
Previous Message Bruce Momjian 2006-06-07 13:18:55 Re: Re [HACKERS]: Still not happy with psql's multiline history behavior