Skip site navigation (1) Skip section navigation (2)

Re: I/O on select count(*)

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Matthew Wakeling <matthew(at)flymine(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: I/O on select count(*)
Date: 2008-05-16 18:23:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Fri, 2008-05-16 at 14:05 -0400, Greg Smith wrote:
> 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.

Alvaro already said this, I thought? The clog is updated only at sub or
main transaction end, thank goodness. When the transactionid is assigned
the page of the clog that contains that transactionid is checked to see
if it already exists and if not, it is initialised.

 Simon Riggs 
 PostgreSQL Training, Services and Support

In response to

pgsql-performance by date

Next:From: Scott MarloweDate: 2008-05-16 18:27:09
Subject: Re: very slow left join
Previous:From: BenDate: 2008-05-16 18:21:04
Subject: Re: very slow left join

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group