Re: 'pg_ctl restart' does not terminate

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: twoflower <standa(dot)kurik(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: 'pg_ctl restart' does not terminate
Date: 2016-11-26 19:47:52
Message-ID: 82e6f690-0cdb-ee79-cb8f-48b2a04c27a2@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message twoflower 2016-11-26 19:52:37 Re: 'pg_ctl restart' does not terminate
Previous Message azhwkd 2016-11-26 19:42:51 Re: query locks up when run concurrently