Re: Some thoughts about i/o priorities and throttling vacuum

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some thoughts about i/o priorities and throttling vacuum
Date: 2003-10-17 14:41:39
Message-ID: 20031017144139.GA3912@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2003-10-17 14:43:09 Re: Mapping Oracle types to PostgreSQL types
Previous Message Matthew T. O'Connor 2003-10-17 14:41:26 Re: Some thoughts about i/o priorities and throttling vacuum