Re: Patch: add timing of buffer I/O requests - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Patch: add timing of buffer I/O requests
Date
Msg-id CA+Tgmoadkzro6zrE2EBPFpBjkrcwVERaiOSUxEF9b2-iP=Peog@mail.gmail.com
Whole thread Raw
In response to Re: Patch: add timing of buffer I/O requests  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Patch: add timing of buffer I/O requests  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Patch: add timing of buffer I/O requests  (Peter Geoghegan <peter@2ndquadrant.com>)
Re: Patch: add timing of buffer I/O requests  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Thu, Apr 5, 2012 at 11:45 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Meanwhile, pg_stat_statements converts the same data to seconds but
> makes it a double rather than a bigint.  I think that was a bad idea
> and we should make it consistent use a bigint and milliseconds while
> we still can.

Hmm.  So, on further review, this is not as simple as it seems.  I'd
like some input from other people on what we should do here.

pg_stat_statements has long exposed a column called "total_time" as a
float8.  It now exposes columns "time_read" and "time_write" which are
actually measuring the time spent reading and writing data blocks, and
those are also exposed as a float8; all these count seconds.

Meanwhile, all times exposed by the stats collector (including the new
and analagous pg_stat_database.block_read_time and
pg_stat_database.block_write_time columns) are exposed as int8; these
count milliseconds.

So, should we make the new columns exposed by pg_stat_statements use
milliseconds, so that the block read/write timings are everywhere in
milliseconds, or should we keep them as a float8, so that all the
times exposed by pg_stat_statements use float8?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: Regarding GSoc proposal
Next
From: Robert Haas
Date:
Subject: disposition of remaining patches