Re: Fix for erroneous warning on Shutdown

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Fix for erroneous warning on Shutdown
Date: 2004-06-16 02:16:00
Message-ID: 200406160216.i5G2G0s04528@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> I could argue that a client-driven process that issues CHECKPOINT every
> >> few seconds is equally deserving of a warning. The only thing wrong is
> >> that the HINT is inapplicable ... but that's why it's a HINT and not
> >> part of the main message.
>
> > Also consider they could have issued a checkpoint right after the system
> > did one. Yuck.
>
> > When I added the warning I hoped to only have it happen for full logs
> > and not CHECKPOINT, but I guess I couldn't and someone else realized
> > that and added that clearer comment, or originally I could do that, but
> > since it has been moved into the bgwriter, it can't anymore.
>
> I believe the original implementation in the postmaster had a somewhat
> different set of bugs ;-). IIRC it did not react to manual checkpoints
> but it did confuse WAL checkpoints with timeout-driven checkpoints.
> The present bgwriter can distinguish the third but not the first two.
>
> If we were willing to take the time to generalize the
> backend-to-bgwriter signaling mechanism then we could distinguish
> WAL-driven checkpoints from manually issued checkpoints. I'm sort of
> intending to do that anyway. The question stands though: why isn't it
> appropriate to warn of overly-frequently-issued manual checkpoints?

Imagine pgbench issuing a checkpoint, which it does. That could trigger
the warning when the parameter really shouldn't be increased. To me,
the warning is for cases when you are filling up the WAL logs too
quickly and checkpoints are happening too frequently. If a user is
doing checkpoints, it isn't anything increasing the checkpoint segments
is going to help.

If you can't fix the code to distinguish between manual and wal-full
checkpoints, we can adjust the warning logic to warn when there are 3
checkpoints in a short period, rather than just two.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2004-06-16 02:38:13 Re: Fix for erroneous warning on Shutdown
Previous Message Tom Lane 2004-06-16 02:00:52 Re: Fix for erroneous warning on Shutdown

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-06-16 02:38:13 Re: Fix for erroneous warning on Shutdown
Previous Message Tom Lane 2004-06-16 02:00:52 Re: Fix for erroneous warning on Shutdown