Re: pg_receivewal and messages printed in non-verbose mode

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_receivewal and messages printed in non-verbose mode
Date: 2017-06-28 10:38:42
Message-ID: 210728A8-3916-4227-87A5-FA678712EB51@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14 Jun 2017, at 06:04, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
>
> On Tue, Jun 13, 2017 at 4:50 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
>> On 13 June 2017 at 14:33, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
>>> Those come from stop_streaming in pg_receivewal.c. Shouldn't those
>>> messages only show up to the user if --verbose is used? It seems
>>> strange to me that at least the first one is written to the user as
>>> that's not an error after promoting a standby.
>>
>> I agree. At least the first should be --verbose only.
>
> I have been looking at all the code surrounding pg_receivewal and
> pg_recvlogical and those are indeed the two only places where we print
> a message in non-verbose mode even if those are not explicit errors.
> pg_recvlogical does not show up any messages when it is signaled or
> when it receives SIGINT or reaches the end of LSN position. I don't
> think that this is worth complicating the code for, just noticed the
> inconsistency on the way.
>
> Perhaps a committer will care about that. Or not. For now I am just
> adding that in the CF.

+1, this patch makes --verbose behave consistently across these programs.
Since Ctrl-C’ing the program to terminate is not an error, I agree that it
should require verbose mode too. I took a look as well and concur with your
findings. Moving to Ready for Committer.

cheers ./daniel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2017-06-28 11:35:12 Re: [PATCH] pg_reload_backend to signal SIGHUP to a specific backend
Previous Message Yugo Nagata 2017-06-28 10:17:56 [PATCH] pg_reload_backend to signal SIGHUP to a specific backend