Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 889E72E363F for ; Wed, 2 Jan 2008 08:59:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 41389-01 for ; Wed, 2 Jan 2008 08:59:12 -0400 (AST) Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by postgresql.org (Postfix) with ESMTP id F05D82E3433 for ; Wed, 2 Jan 2008 08:57:45 -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 977469FCA; Wed, 2 Jan 2008 13:57:38 +0100 (CET) Message-ID: <477B8A41.6010803@lelarge.info> Date: Wed, 02 Jan 2008 13:57:37 +0100 From: Guillaume Lelarge User-Agent: Thunderbird 2.0.0.9 (X11/20071112) MIME-Version: 1.0 To: Alvaro Herrera CC: Tom Lane , "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> <477B4D37.4090105@lelarge.info> <20080102115435.GB31408@alvh.no-ip.org> In-Reply-To: <20080102115435.GB31408@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/10 X-Sequence-Number: 27784 Alvaro Herrera wrote: > Guillaume Lelarge wrote: > >> 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) > > Ever thought of doing it all in a single transaction? > Well, I'm not sure of the consequences of this. I'll get a look at this. What I first thought on my previous mail was to keep in memory a list of all types available, but this was stupid : it needs refresh when another user adds a new type and I'm sure there are others corner cases. I much prefer your idea, thanks. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com