Re: What is xmin ?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: What is xmin ?
Date: 2005-01-18 15:34:25
Message-ID: 20050118153424.GB26809@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 18, 2005 at 02:43:09PM +0100, Karsten Hilbert wrote:
> > Can you guys tell me how to interpret this value. I want to convert
> > this to date format. Is it possible ?
> No.
>
> XMIN holds the id of the transaction which did the most recent
> change to a row as is visible from within the current
> transaction. Unless it wraps around (is that possible ?) older
> transactions should have XMIN values lower than younger
> transactions.

Correct. XMIN is a transaction ID and it can wraparound. To counter
this there is a special XMIN value which means "older than any
transaction". Which the reason you must run VACUUM at least once every
billion transactions or so. Hardly a difficult request :)

There is no way to convert it to a date, since it doesn't represent a
date or even a point in time. It represents a transaction and how it
relates to other transactions.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Juan Jose Siles Salinas 2005-01-18 15:48:05 Error al Subir base de datos
Previous Message Daniel Martini 2005-01-18 15:16:12 Howto cite postgresql in scientific publications?