Ask a Question related to PostgreSQL / PGSQL, Design and Development.
-
Antony Paul #1
What is xmin ?
Hi,
I read about xmin in a thread on optimistic concurrency control.
Can you guys tell me how to interpret this value. I want to convert
this to date format. Is it possible ?
rgds
Antony Paul
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
[url]http://www.postgresql.org/docs/faqs/FAQ.html[/url]
Antony Paul Guest
-
Karsten Hilbert #2
Re: What is xmin ?
> Can you guys tell me how to interpret this value. I want to convert
No.> this to date format. Is it possible ?
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.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
message can get through to the mailing list cleanly
Karsten Hilbert Guest
-
Alvaro Herrera #3
Re: What is xmin ?
On Tue, Jan 18, 2005 at 02:43:09PM +0100, Karsten Hilbert wrote:
Yes, it wraps around, that's why modulo arithmetic is used internally to> 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.
handle it. Beyond that, it skips a few (3 or 4) special values just
above zero.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"There was no reply" (Kernel Traffic)
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
message can get through to the mailing list cleanly
Alvaro Herrera Guest
-
Martijn van Oosterhout #4
Re: What is xmin ?
On Tue, Jan 18, 2005 at 02:43:09PM +0100, Karsten Hilbert wrote:
Correct. XMIN is a transaction ID and it can wraparound. To counter> No.> > Can you guys tell me how to interpret this value. I want to convert
> > this to date format. Is it possible ?
>
> 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.
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@svana.org> [url]http://svana.org/kleptog/[/url]-----BEGIN PGP SIGNATURE-----> 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.
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see [url]http://www.gnupg.org[/url]
iD8DBQFB7Sx/Y5Twig3Ge+YRAgfvAJ4hpzxM52v/IFpPeVMF/QTkoo6tHACglkUo
NQLVNFw6qEYG+JuYcBQx7tU=
=iAn6
-----END PGP SIGNATURE-----
Martijn van Oosterhout Guest
-
Christopher Browne #5
Re: What is xmin ?
In an attempt to throw the authorities off his trail, [email]antonypaul24@gmail.com[/email] (Antony Paul) transmitted:
xmin is a transaction ID number. There is no such conversion> I read about xmin in a thread on optimistic concurrency control.
> Can you guys tell me how to interpret this value. I want to convert
> this to date format. Is it possible ?
possible.
[url]http://www.faqs.org/docs/ppbook/x4636.htm[/url]
It would be kind of neat if there were some table into which
transactions were logged; in that case, there would presumably be a
couple of timestamps, namely the time at which the transaction began
and the time at which the transaction ended. There is no such table
by default.
--
wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','acm.org').
[url]http://www.ntlug.org/~cbbrowne/languages.html[/url]
We are in fact well and truly doomed.
-- Jamie Zawinski [url]http://www.jwz.org/gruntle/nscpdorm.html[/url]
Christopher Browne Guest
-
Alvaro Herrera #6
Re: What is xmin ?
On Tue, Jan 18, 2005 at 01:16:55PM -0500, Christopher Browne wrote:
It would be useful in a savepoints' world only if accompanied by the> It would be kind of neat if there were some table into which
> transactions were logged; in that case, there would presumably be a
> couple of timestamps, namely the time at which the transaction began
> and the time at which the transaction ended. There is no such table
> by default.
time a subtransaction began and ended, and the information about
parent/child relationship.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Tiene valor aquel que admite que es un cobarde" (Fernandel)
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
[url]http://www.postgresql.org/docs/faqs/FAQ.html[/url]
Alvaro Herrera Guest



Reply With Quote

