Re: 'pg_ctl restart' does not terminate - Mailing list pgsql-general

From Adrian Klaver
Subject Re: 'pg_ctl restart' does not terminate
Date
Msg-id 82e6f690-0cdb-ee79-cb8f-48b2a04c27a2@aklaver.com
Whole thread Raw
In response to Re: 'pg_ctl restart' does not terminate  (twoflower <standa.kurik@gmail.com>)
Responses Re: 'pg_ctl restart' does not terminate  (twoflower <standa.kurik@gmail.com>)
List pgsql-general
On 11/26/2016 11:33 AM, twoflower wrote:
> Ah, it didn't occur to me to try hitting ENTER. Still, this would be
> fine for manually running the script, but as I am restarting the server
> as a part of SaltStack config, I need |pg_ctl| to terminate without me
> intervening.
>
> The solution with the |-l| argument is fine, I think. Even if I use it,
> the server then logs its output into the file I specified in
> |postgresql.conf| (which I would not expect, by the way).

You are seeing the two stages of logging. The first stage, that you are
capturing with -l, is the early logging before the logging configuration
you set up in postgresql.conf kicks in. This is why you see this:

-2016-11-26 11:16:40.737 PST-0 LOG:  redirecting log output to logging
collector process
-2016-11-26 11:16:40.737 PST-0 HINT:  Future log output will appear in
directory "pg_log".

After the above the rest of the logging goes to whatever you set up in
postgresql.conf, assuming it was set up. Otherwise it will go to the
stdout of the terminal.

--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: azhwkd
Date:
Subject: Re: query locks up when run concurrently
Next
From: twoflower
Date:
Subject: Re: 'pg_ctl restart' does not terminate