Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 93CBC1337B64 for ; Wed, 19 Jan 2011 10:40:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 33253-05 for ; Wed, 19 Jan 2011 14:39:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 0DBAD1337B39 for ; Wed, 19 Jan 2011 10:39:55 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 19 Jan 2011 08:39:54 -0600 Message-Id: <4D36A35302000025000397CC@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 19 Jan 2011 08:39:47 -0600 From: "Kevin Grittner" To: "Charles.Hou" , "=?ISO-8859-15?Q?Filip=20Rembia*kowski?=" Cc: Subject: Re: the XID question References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/167 X-Sequence-Number: 41954 Filip Rembia*kowski wrote: > 2011/1/19 Charles.Hou : >> " select * from mybook" SQL command also increase the XID ? > > Yes. Single SELECT is a transaction. Hence, it needs a transaction > ID. No, not in recent versions of PostgreSQL. There's virtual transaction ID, too; which is all that's needed unless the transaction writes something. Also, as a fine point, if you use explicit database transactions (with BEGIN or START TRANSACTION) then you normally get one XID for the entire transaction, unless you use SAVEPOINTs. -Kevin