Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode
От | Michael Paquier |
---|---|
Тема | Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode |
Дата | |
Msg-id | CAB7nPqRD7+qBLX-dgWZ0GTCdUtLu1j37858GemnNGYpvMDR20A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: [HACKERS] pg_receivewal and messages printed in non-verbose mode
|
Список | pgsql-hackers |
On Sun, Jul 9, 2017 at 9:30 PM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Sun, Jul 9, 2017 at 5:58 AM, Magnus Hagander <magnus@hagander.net> wrote: >> I wonder if we should actually just remove the second message? AFAICT no >> other tools log that information. Is there any particular reason why we want >> that logging in pg_receivewal when we don't have it in other tools? > > I maintain a fork of pg_receivewal lately that works as a service, and > I have found myself a fan of this log bit when debugging funky issues. > That's a personal opinion, no objections to remove it either. The patch I sent upthread was actually doing that, which is obviously incorrect: - if (time_to_abort) + if (verbose && time_to_abort) { fprintf(stderr, _("%s: received interrupt signal, exiting\n"), progname); While the version on my laptop does that: if (time_to_abort) { - fprintf(stderr, _("%s: received interrupt signal, exiting\n"), - progname); + if (verbose) + fprintf(stderr, _("%s: received interrupt signal, exiting\n"), + progname); return true; } return false; Not sure how that feel into the cracks. I slept on it, and let's do things the same way as the other tools do without logs in this case. So this gives the patch attached. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: