select updates pg_stat_database

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: select updates pg_stat_database
Date: 2006-08-14 19:31:02
Message-ID: 1155583862.11726.50.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have noticed that all SELECT queries alone in a transaction also
update pg_stat_database (I know it's just a view that calls
pg_stat_get_db_xact_commit()).

Does that mean that SELECTs by themselves require a disk write? If so,
is that a synchronous disk write? Is it due to something else entirely
(like autovacuum or the statistics collector)?

Also, is there a way to retrieve the current transaction id?

Thanks,
Jeff Davis

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-08-14 19:51:22 Re: text datum VARDATA and strings
Previous Message Scott Ribe 2006-08-14 18:39:48 Re: Best approach for a "gap-less" sequence