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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Log notice that checkpoint is to be written on shutdown
Date: 2014-10-09 12:21:18
Message-ID: CA+TgmobXQExH-idyhUtQmLqBhHdqkegRjgf_jcZjXS_Zx9sNRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 8, 2014 at 1:52 PM, Michael Banck <michael(dot)banck(at)credativ(dot)de> wrote:
> Looking at it from a DBA perspective, this would indeed be better, yes.
>
> However, I see a few issues with that:
>
> 1. If you are using an init script (or another wrapper around pg_ctl),
> you don't get any of its output it seems.
>
> 2. Having taken a quick look at pg_ctl, it seems to just kill the
> postmaster on shutdown and wait for its PID file to disappear. I don't
> see how it should figure out that PostgreSQL is waiting for a checkpoint
> to be finished?
>
>> Or do both. I suspect elog( INFO, ... ) might do that.
>
> That would imply that pg_ctl receives and writes out log messages
> directed at clients, which I don't think is true? Even if it was,
> client_min_messages does not include an INFO level, and LOG is not being
> logged to clients by default. So the first common level above the
> default of both client_min_messages and log_min_messages would be
> WARNING, which seems excessive to me.
>
> As I said, I only took a quick look at pg_ctl though, so I might well be
> missing something.

I think you're spot-on.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-10-09 12:24:58 Re: Log notice that checkpoint is to be written on shutdown
Previous Message Andres Freund 2014-10-09 12:20:38 Re: Deferring some AtStart* allocations?