pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-admin@postgresql.org
Subject: Re: What's the XID?
Date: Thu, 27 Dec 2007 12:55:24 -0500
Message-ID: <17845.1198778124@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0712270823430.2757@glacier.frostconsultingllc.com>
References: <14508639.post@talk.nabble.com>
	<20071227154243.GF8160@crankycanuck.ca>
	<11803.1198771221@sss.pgh.pa.us>
	<Pine.LNX.4.64.0712270823430.2757@glacier.frostconsultingllc.com>

Jeff Frost <jeff@frostconsultingllc.com> 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



view thread (18+ messages)  latest in thread

Message-ID: <17845.1198778124@sss.pgh.pa.us>
Permalink:  ../17845.1198778124@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17845.1198778124@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com, ajs@crankycanuck.ca
  Subject: Re: What's the XID?
  In-Reply-To: <17845.1198778124@sss.pgh.pa.us>

* 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