Re: Set visibility map bit after HOT prune
Amit Kapila <amit.kapila@huawei.com>
From: Amit Kapila <amit.kapila@huawei.com>
To: "'Robert Haas'" <robertmhaas@gmail.com>, "'Simon Riggs'" <simon@2ndquadrant.com>
Cc: "'Tom Lane'" <tgl@sss.pgh.pa.us>, "'Pavan Deolasee'" <pavan.deolasee@gmail.com>, "'pgsql-hackers'" <pgsql-hackers@postgresql.org>
Date: 2012-12-20T05:22:10Z
Lists: pgsql-hackers
On Thursday, December 20, 2012 6:14 AM Robert Haas wrote: > On Wed, Dec 19, 2012 at 12:39 PM, Simon Riggs <simon@2ndquadrant.com> > wrote: > > The benefit of saying that only UPDATEs clean the block is that this > > penalises only the workload making the mess, rather than everybody > > cleaning up repeatedly over one messy guy. > > Right, but there are plenty of situations where having everybody clean > up after the messy guy is better than waiting around and hoping that > Mom (aka vacuum) will do it. If we see for similar situation in index, during index scan, it just marks the tuple as DEAD without taking X lock and then during split (when it already has X lock) it free's the actual space. So not sure if it's good idea to take X lock for cleanup during heap scan, where write operation's happens more frequently and have better chance of cleanup. With Regards, Amit Kapila.