From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Instrument checkpoint sync calls |
Date: | 2010-12-13 08:19:46 |
Message-ID: | 4D05D722.5040205@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas wrote:
> I'm wondering why md.c is converting the results from an exact value to a floating
> point, only to have xlog.c turn around and convert back to an integer.
> I think it could just return milliseconds directly, or if you're
> worried about a checkpoint that takes more than 24 days to complete,
> seconds and microseconds.
md.c is printing the value as a float, so I converted early to a double
and then percolated it upward from there. More an artifact of how the
code grew from its initial form than an intentional decision. I see your
point that making elapsed, total_elapsed, ckpt_agg_sync_time, and
ckpt_longest_sync all the same type of integer that
INSTR_TIME_GET_MICROSEC returns would reduce the potential for rounding
abberations. I could do another rev of the patch tomorrow with that
change if you'd prefer it that way. I don't have a strong opinion about
that implementation detail; given that xlog.c is printing a less
fine-grained time anyway (seconds with 3 digits vs. msec with 3 digits)
it seems unlikely to run into a real problem here.
--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-12-13 09:02:50 | Re: pg_archivecleanup should remove WAL files also in pg_xlog? |
Previous Message | Pavel Stehule | 2010-12-13 08:07:23 | Re: hstores in pl/python |