pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: I/O on select count(*)
Date: Fri, 16 May 2008 14:05:49 -0400 (EDT)
Message-ID: <Pine.GSO.4.64.0805161118210.4987@westnet.com> (raw)
In-Reply-To: <20080515155232.GC8221@alvh.no-ip.org>
References: <920841.71690.qm@web44808.mail.sp1.yahoo.com>
	<482B1D5F.EE98.0025.0@wicourts.gov>
	<Pine.GSO.4.64.0805142133250.27290@westnet.com>
	<20080515020553.GN9838@alvh.no-ip.org>
	<Pine.LNX.4.64.0805151245360.16756@aragorn.flymine.org>
	<20080515155232.GC8221@alvh.no-ip.org>

On Thu, 15 May 2008, Alvaro Herrera wrote:

> Starting a transaction does not write anything to pg_clog.

For Matt and others, some details here are in 
src/backend/access/transam/README:

"pg_clog records the commit status for each transaction that has been 
assigned an XID."

"Transactions and subtransactions are assigned permanent XIDs only when/if 
they first do something that requires one --- typically, 
insert/update/delete a tuple, though there are a few other places that 
need an XID assigned."

After reading the code and that documentation a bit, the part I'm still 
not sure about is whether the CLOG entry is created when the XID is 
assigned and then kept current as the state changes, or whether that isn't 
even in CLOG until the transaction is committed.  It seems like the 
latter, but there's some ambiguity in the wording and too many code paths 
for me to map right now.



view thread (54+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0805161118210.4987@westnet.com>
Permalink:  ../Pine.GSO.4.64.0805161118210.4987@westnet.com/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0805161118210.4987@westnet.com

 · 

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-performance@postgresql.org
  Cc: gsmith@gregsmith.com, alvherre@commandprompt.com, matthew@flymine.org
  Subject: Re: I/O on select count(*)
  In-Reply-To: <Pine.GSO.4.64.0805161118210.4987@westnet.com>

* 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