From: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: remove lock protection on HeapTupleSatisfiesVacuum |
Date: | 2006-06-06 04:32:06 |
Message-ID: | e630gk$16t1$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote
>
> This patch scares the heck out of me. You need to offer some pretty
> compelling performance reasons before I'd accept any part of it,
> Changing a buffer you hold no lock on is a recipe for disaster.
>
Me too, in fact :-(.
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. This
patch makes sure that (1) can't happen. For (2), the original code has a
similar pitfalls -- if we only hold shared lock, then two process reach here
can change the bits at the same time.
Regards,
Qingqing
From | Date | Subject | |
---|---|---|---|
Next Message | Victor B. Wagner | 2006-06-06 07:51:35 | Contrib module to examine client certificate |
Previous Message | Tom Lane | 2006-06-06 03:21:55 | Re: remove lock protection on HeapTupleSatisfiesVacuum |