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
"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.
From there, it doesn't make its way out to disk until the internal CLOG
buffers are filled, at which point the least recently used buffer there is
evicted to permanent storage.
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
In response to
pgsql-performance by date
|Next:||From: Scott Marlowe||Date: 2008-05-16 18:09:46|
|Subject: Re: very slow left join|
|Previous:||From: Ben||Date: 2008-05-16 17:56:03|
|Subject: very slow left join|