Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id BABE12E005C for ; Wed, 2 Jan 2008 04:37:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99321-03 for ; Wed, 2 Jan 2008 04:37:18 -0400 (AST) Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by postgresql.org (Postfix) with ESMTP id E7EAF2E0040 for ; Wed, 2 Jan 2008 04:37:18 -0400 (AST) Received: from [192.168.10.1] (ASte-Genev-Bois-153-1-53-75.w81-249.abo.wanadoo.fr [81.249.147.75]) by sd-2317.dedibox.fr (Postfix) with ESMTP id 4D0D0A296; Wed, 2 Jan 2008 09:37:16 +0100 (CET) Message-ID: <477B4D37.4090105@lelarge.info> Date: Wed, 02 Jan 2008 09:37:11 +0100 From: Guillaume Lelarge User-Agent: Thunderbird 2.0.0.9 (X11/20071112) MIME-Version: 1.0 To: Tom Lane CC: "ivan.hou" , pgsql-admin@postgresql.org Subject: Re: What's the XID? References: <14508639.post@talk.nabble.com> <20071227154243.GF8160@crankycanuck.ca> <14573789.post@talk.nabble.com> <9801.1199251949@sss.pgh.pa.us> In-Reply-To: <9801.1199251949@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/6 X-Sequence-Number: 27780 Tom Lane wrote: > "ivan.hou" writes: >> step 1. SELECT datname, age(datfrozenxid) FROM pg_database; >> --> mydb age:33183 >> step 2. SELECT datname, age(datfrozenxid) FROM pg_database; >> --> mydb age:33188 > >> why always increased by 5? > > If you do it directly in psql, it increases by 1. > >> Postgresql Ver:8.1.3 >> using pgAdminIII Query window > > Perhaps you should ask the pgAdmin people what they're doing behind your > back ... We first send the query to the database. For each returned column, we send two queries. The first one gives us the type's name of the column and the second one gives us the OID of the base type. So, each query executed with pgAdmin's query tool should increase age(datfrozenxid) by : 1 + (2 * number of columns in the SELECT) Regards. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com