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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log notice that checkpoint is to be written on shutdown
Date: 2014-10-09 12:24:58
Message-ID: 20141009122458.GC6724@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-10-02 15:21:48 +0200, Michael Banck wrote:
> Hi,
>
> 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. As no message besides "shutting down"
> is written to the server log in this case, we even had users believing
> the server was hanging and pondering killing it manually.
>
> In order to alert those users that a checkpoint is being written, I
> propose to add a log message "waiting for checkpoint ..." on shutdown,
> even if log_checkpoints is disabled, as this particular checkpoint might
> be important information.
>
> I've attached a trivial patch for this, should it be added to the next
> commitfest?

How about flipping the default for log_checkpoints instead? There really
isn't a good reason for having it disabled by default.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-10-09 12:47:09 Re: Scaling shared buffer eviction
Previous Message Robert Haas 2014-10-09 12:21:18 Re: Log notice that checkpoint is to be written on shutdown