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

From Heikki Linnakangas
Subject Re: Feedback on getting rid of VACUUM FULL
Date
Msg-id 4AB33E5F.20803@enterprisedb.com
Whole thread Raw
In response to Re: Feedback on getting rid of VACUUM FULL  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> 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.

Yeah, you have to check xmin as well.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: marcin mank
Date:
Subject: Re: Feedback on getting rid of VACUUM FULL
Next
From: Jeevan Chalke
Date:
Subject: numeric_to_number() function skipping some digits