Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D248F2E259B for ; Thu, 27 Dec 2007 13:55:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 27727-04 for ; Thu, 27 Dec 2007 13:55:33 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 284B62E0291 for ; Thu, 27 Dec 2007 13:55:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBRHtOnv017846; Thu, 27 Dec 2007 12:55:25 -0500 (EST) To: Jeff Frost cc: Andrew Sullivan , pgsql-admin@postgresql.org Subject: Re: What's the XID? In-reply-to: References: <14508639.post@talk.nabble.com> <20071227154243.GF8160@crankycanuck.ca> <11803.1198771221@sss.pgh.pa.us> Comments: In-reply-to Jeff Frost message dated "Thu, 27 Dec 2007 08:27:16 -0800" Date: Thu, 27 Dec 2007 12:55:24 -0500 Message-ID: <17845.1198778124@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/217 X-Sequence-Number: 27734 Jeff Frost writes: > On Thu, 27 Dec 2007, Tom Lane wrote: >> But note that as of 8.3, SELECT-only transactions won't acquire an >> XID and hence won't advance the counter. So if you're thinking of >> writing code that depends on that behavior, don't. > So, the new XID counter won't advance unless there's at least one > INSERT/UPDATE/DELETE in the transaction? Does it also update for SELECTs that > call a function which does some write activity? Any "write" activity causes an XID to be acquired. > Is there a new counter (or old one that I don't know about) that keeps track > of the SELECT-only transactions? There's no global counter. There's a backend-local "virtual transaction id" counter. regards, tom lane