Re: Some thoughts about i/o priorities and throttling vacuum - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Some thoughts about i/o priorities and throttling vacuum
Date
Msg-id 20031017144139.GA3912@dcc.uchile.cl
Whole thread Raw
In response to Re: Some thoughts about i/o priorities and throttling vacuum  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Responses Re: Some thoughts about i/o priorities and throttling vacuum
List pgsql-hackers
On Fri, Oct 17, 2003 at 07:55:44PM +0530, Shridhar Daithankar wrote:

> OK. So here is what I understand. I have a table which contains 100 rows 
> which appeated there due to some insert operation. Then I vacuum it. And 
> sit there for internity for rest of the database to approach the 
> singularity(the xid wraparound..:-) Nice term, isn't it?).
> 
> So this static table is vulnerable to xid wraparound? I doubt.
> 
> Did I miss something?

You are missing the part when the XID that was formerly a "committed
transaction" becomes an uncommitted transaction when the wraparound
occurs... so the tuples will have creation XID by an uncommitted
transaction, and current transactions will not see them.  Voila, your
table is empty.

The trick to keep in mind is that the XID comparison functions use
"modulo" operations, _but_ there are special "frozen" XIDs that are
always "committed" -- that's why a VACUUM FREEZE would relieve the table
forever from this problem.

(At least this is how I understand it -- I could be totally wrong here)

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Some thoughts about i/o priorities and throttling vacuum
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Some thoughts about i/o priorities and throttling vacuum