Re: Log notice that checkpoint is to be written on shutdown - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: Log notice that checkpoint is to be written on shutdown
Date
Msg-id CABRT9RCi-jC24gQvKb+h3Q6CvJi67sqtFoesjENQAGmnZPqQoA@mail.gmail.com
Whole thread Raw
In response to Log notice that checkpoint is to be written on shutdown  (Michael Banck <michael.banck@credativ.de>)
List pgsql-hackers
On Thu, Oct 2, 2014 at 4:21 PM, Michael Banck <michael.banck@credativ.de> wrote:
> we have seen repeatedly that users can be confused about why PostgreSQL
> is not shutting down even though they requested it.  Usually, this is
> because `log_checkpoints' is not enabled and the final checkpoint is
> being written, delaying shutdown.

Are you convinced that that's the *actual* reason? Maybe you're
mis-attributing it.

In my experience shutdown delays are often caused by using the default
"smart" shutdown mode, which is another way of saying "completely
stupid". It waits until all connections to the server are closed --
meaning never in common situations with connection pooling or when an
admin has forgotten their psql shell open. To add insult to injury,
you can't open a new connection to invoke pg_terminate_backend() to
kill them, either.

In the case of a "restart", it can cause much longer downtime than a
fast/immediate restart would.

Sorry for the rant, but am I the only one hating that default?

Regards,
Marti



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Expose options to explain? (track_io_timing)
Next
From: Andres Freund
Date:
Subject: Re: Log notice that checkpoint is to be written on shutdown