From: ivan.hou <ivan.hou@msa.hinet.net>
To: pgsql-admin@postgresql.org
Subject: Re: What's the XID?
Date: Tue, 1 Jan 2008 20:52:02 -0800 (PST)
Message-ID: <14573789.post@talk.nabble.com> (raw)
In-Reply-To: <20071227154243.GF8160@crankycanuck.ca>
References: <14508639.post@talk.nabble.com>
<20071227154243.GF8160@crankycanuck.ca>
how can i prove that the xid had been increased by 1?
i do a test,
step 1. SELECT datname, age(datfrozenxid) FROM pg_database;
--> mydb age:33183
step 2. SELECT datname, age(datfrozenxid) FROM pg_database;
--> mydb age:33188
step 3. SELECT datname, age(datfrozenxid) FROM pg_database;
--> mydb age:33193
why always increased by 5?
Postgresql Ver:8.1.3
using pgAdminIII Query window
Andrew Sullivan wrote:
>
> On Wed, Dec 26, 2007 at 05:48:14PM -0800, ivan.hou wrote:
>>
>> XID is transcation ID?
>
> Yes.
>
>> so, "select * from mydb" is a transcation?
>
> Yes.
>
>> if i executed "select * from mydb" twice, the XID wil be increased by 2
>
> Yep. Whereas if you did
>
> BEGIN;
> SELECT 1;
> SELECT 1;
> COMMIT;
>
> the xid would be increased by 1.
>
> A
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
>
--
View this message in context: http://www.nabble.com/What%27s-the-XID--tp14508639p14573789.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ivan.hou@msa.hinet.net
Subject: Re: What's the XID?
In-Reply-To: <14573789.post@talk.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox