Re: Log notice that checkpoint is to be written on shutdown

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log notice that checkpoint is to be written on shutdown
Date: 2014-10-09 18:10:14
Message-ID: 20141009181014.GW28859@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > For embedded devices and similar small-scale systems, I can see Tom's
> > point. At the same time, I would expect those to require sufficient
> > configuration that also setting log_checkpoints to 'off' wouldn't be a
> > huge deal.
>
> Here's the problem as I see it: DBAs will be annoyed by the spam and will
> turn it off. Then they'll still be confused when a shutdown takes a long
> time. So this is no fix at all for the original complaint.

I've not run into very many folks working with embedded devices, so take
this with a grain of salt, but I have *never* run into a DBA who is
running a production system who doesn't want log_checkpoints,
log_connections, log_disconnections, and a much more verbose
log_line_prefix (and more, really), so I don't buy into this argument at
all. Our default logging is no where near what logging on a production
system should be and I'd be interested to meet the DBA who disagrees
with that, because they've got some requiremeents that I've not dealt
with before.

Basically, I believe every DBA who is using PG for more than a toy setup
(or strictly development) would be pleasantly surprised to have
checkpoints logged; far too many of them don't even know the option
exists.

> I'm also not entirely convinced that checkpoints have anything to do with
> the complaint. Once we get a shutdown request, we're going to have to
> perform a checkpoint, which we do at full speed, no delays (or at least
> did so last I checked). Whether a checkpoint was already in progress is
> more or less irrelevant. It's always been like that and I can't recall
> anybody complaining about it. I suspect Marti is correct that the real
> problem is elsewhere.

This is certainly an interesting question and was asked about up-thread
also, I believe. I agree that if it wasn't slow to shut down due to a
checkpoint then logging checkpoints isn't going to help. If the issue
is that it's a 'smart' shutdown request with folks logged in, then
perhaps we should consider logging *that* fact.. "waiting to shut down
due to user connections" or some such.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-10-09 18:29:11 Re: replicating DROP commands across servers
Previous Message Tom Lane 2014-10-09 18:00:51 Re: Log notice that checkpoint is to be written on shutdown