Re: Patch: add timing of buffer I/O requests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Greg Smith <greg(at)2ndQuadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: add timing of buffer I/O requests
Date: 2012-04-13 22:22:35
Message-ID: 27804.1334355755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <jim(at)nasby(dot)net> writes:
> I agree that ms is on it's way out... and frankly it wouldn't surprise me if at some point we actually had need of ns resolution.

> Given that, I don't think ms or us definitions make sense... float8 seconds seams much more logical to me.

Well, the important point is that it be float8, so that fractions of
whatever units you choose can be represented. I do not feel a strong
need to change the units in all the existing pg_stat_ columns from msec
to sec; that strikes me as just breaking things to little gain. If the
majority of them were in sec then I'd want to converge on that, but
since the majority are in msec it seems like the path of least breakage
is to converge on that.

> Though, if we're going to end up seriously breaking things anyway,
> perhaps it would make sense to switch everything over to interval... I
> realize that there's more overhead there, but I don't think selecting
> from the stats views is exactly performance critical.

But (a) I *don't* want to seriously break things, and don't see a need
to; (b) interval is expensive and has got its own problems, notably an
internal limitation to usec resolution that we would not be able to get
rid of easily. It's not even apparent to me that interval is
semantically The Right Thing for values that represent an accumulation
of a lot of different measurements.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-04-13 22:53:48 Re: BUG #6572: The example of SPI_execute is bogus
Previous Message Peter Eisentraut 2012-04-13 22:07:07 Re: typo fix