Re: I/O on select count(*)
От | Greg Smith |
---|---|
Тема | Re: I/O on select count(*) |
Дата | |
Msg-id | Pine.GSO.4.64.0805161118210.4987@westnet.com обсуждение исходный текст |
Ответ на | Re: I/O on select count(*) (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: I/O on select count(*)
Re: I/O on select count(*) |
Список | pgsql-performance |
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. 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@gregsmith.com http://www.gregsmith.com Baltimore, MD
В списке pgsql-performance по дате отправления: