| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: checkpoints are duplicated even while the system is idle |
| Date: | 2011-10-06 16:06:04 |
| Message-ID: | 3356.1317917164@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> The current idea is that if there has been no activity then we skip
> checkpoint. But all it takes is a single WAL record and off we go with
> another checkpoint. If there hasn't been much WAL activity, there is
> not much point in having another checkpoint record since there is
> little if any time to be saved in recovery.
> So why not avoid checkpoints until we have written at least 1 WAL file
> worth of data?
+1, but I think you need to compare to the last checkpoint's REDO
pointer, not to the position of the checkpoint record itself.
Otherwise, the argument falls down if there was a lot of activity
during the last checkpoint (which is not unlikely in these days of
spread checkpoints).
Also I think the comment needs more extensive revision than you gave it.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-10-06 16:13:14 | Re: [COMMITTERS] pgsql: Ensure that contrib/pgstattuple functions respond to cancel |
| Previous Message | Simon Riggs | 2011-10-06 15:55:37 | Re: checkpoints are duplicated even while the system is idle |