Re: Feedback on getting rid of VACUUM FULL - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Feedback on getting rid of VACUUM FULL
Date
Msg-id 1253258906.9666.337.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Feedback on getting rid of VACUUM FULL  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Responses Re: Feedback on getting rid of VACUUM FULL
List pgsql-hackers
On Fri, 2009-09-18 at 08:50 +0200, Albe Laurenz wrote:
> Tom Lane wrote:
> > > I don't see any reason why not breaking the user visible behavior of
> > > tuples CTID between any two major releases,
> > 
> > > Am I completely wet here?
> > 
> > Completely.  This is a user-visible behavior that we have encouraged
> > people to rely on, and for which there is no easy substitute.
> 
> I second that: it would hurt to lose this generic technique for
> optimistic locking.

CTIDs don't help with optimistic locking, though it seems they can.

If you don't hold open the transaction then someone else can update the
row. That sounds good, but because of HOT it is possible that the same
CTID with the same PK value occupies that exact CTID value when you
return to check it. You think row has not been updated so you perform
your update, but it has been updated, so you overwrite previous data -
data loss. Actually worse, sporadic data loss because of race
conditions.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: ECPG patchset
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: ECPG patchset