From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Theo Schlossnagle <jesus(at)omniti(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Expose checkpoint start/finish times into SQL. |
Date: | 2008-04-04 00:29:18 |
Message-ID: | 29257.1207268958@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:
>> Why is that useful?
> For knowing how long checkpoints are taking. If they are taking too
> long you may need to adjust your bgwriter settings, and it is a
> serious drag to parse postgresql logs for this info.
1. To do anything useful along those lines, you would need to look at a
lot of checkpoints over time, which is what log_checkpoints is good for.
This patch only tells you about the latest, which isn't very useful
for making any good decisions about parameters.
2. If I read the patch correctly, half of the time what you'd be seeing
is the start time of the currently-active checkpoint and the completion
time of the prior checkpoint. I don't know what those numbers are good
for at all.
3. As of PG 8.3, the bgwriter tries very hard to make the elapsed time
of a checkpoint be just about checkpoint_timeout *
checkpoint_completion_target, regardless of load factors. So unless
your settings are completely broken, measuring the actual time isn't
going to tell you much.
In short: Heikki's question is on point.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2008-04-04 00:36:17 | Re: Expose checkpoint start/finish times into SQL. |
Previous Message | Sibte Abbas | 2008-04-03 23:54:23 | Re: psql slash# command |