Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Fujii Masao
On Wed, Apr 8, 2015 at 5:53 AM, Alvaro Herrera wrote: > Heikki Linnakangas wrote: >> On 04/07/2015 05:59 AM, Michael Paquier wrote: > >> >Fix inconsistent handling of logs in pg_rewind >> > >> >pg_rewind was handling a couple of things differently compared to the >> >other src/bin utilities: >> >-

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Alvaro Herrera
Heikki Linnakangas wrote: > On 04/07/2015 05:59 AM, Michael Paquier wrote: > >Fix inconsistent handling of logs in pg_rewind > > > >pg_rewind was handling a couple of things differently compared to the > >other src/bin utilities: > >- Logging output needs to be flushed on stderr, not stdout > > A

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Heikki Linnakangas
On 04/07/2015 05:59 AM, Michael Paquier wrote: On Mon, Apr 6, 2015 at 9:10 PM, Fujii Masao wrote: I eliminated a bunch of newlines in the log messages that seemed really unnecessary to me, simplifying a bit the whole. So the patch removed the newlines from the error messages, and added the n

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Michael Paquier
On Tue, Apr 7, 2015 at 4:33 PM, Fujii Masao wrote: > Isn't the term "PostgreSQL superuser" confusing? I'm afraid that a user might > confuse "PostgreSQL superuser" with a database superuser. I see you just > borrowed that term from pg_resetxlog.c, though. BTW, initdb and pg_ctl also > have the same

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Michael Paquier
On Tue, Apr 7, 2015 at 4:16 PM, Fujii Masao wrote: > On Mon, Apr 6, 2015 at 10:01 PM, Alvaro Herrera > wrote: >> Fujii Masao wrote: >>> On Mon, Apr 6, 2015 at 5:33 PM, Michael Paquier >>> wrote: >>> > On Mon, Apr 6, 2015 at 1:41 PM, Michael Paquier wrote: >>> >> I guess that you are working on a

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Fujii Masao
On Tue, Apr 7, 2015 at 11:59 AM, Michael Paquier wrote: > On Mon, Apr 6, 2015 at 9:10 PM, Fujii Masao wrote: >> I'm not familiar with native language support (sorry), but don't we need to >> add the shortcut of gettext into every calls of pg_log and pg_fatal, e.g., >> change pg_fatal("xxx") to pg

Re: [HACKERS] pg_rewind and log messages

2015-04-07 Thread Fujii Masao
On Mon, Apr 6, 2015 at 10:01 PM, Alvaro Herrera wrote: > Fujii Masao wrote: >> On Mon, Apr 6, 2015 at 5:33 PM, Michael Paquier >> wrote: >> > On Mon, Apr 6, 2015 at 1:41 PM, Michael Paquier wrote: >> >> I guess that you are working on a patch? If not, you are looking for one? >> > >> > Code-speak

Re: [HACKERS] pg_rewind and log messages

2015-04-06 Thread Michael Paquier
On Mon, Apr 6, 2015 at 9:10 PM, Fujii Masao wrote: > I'm not familiar with native language support (sorry), but don't we need to > add the shortcut of gettext into every calls of pg_log and pg_fatal, e.g., > change pg_fatal("xxx") to pg_fatal(_("xxx"))? I know that fprintf() in > pg_Log_v() has su

Re: [HACKERS] pg_rewind and log messages

2015-04-06 Thread Michael Paquier
On Mon, Apr 6, 2015 at 10:01 PM, Alvaro Herrera wrote: > I'm not sure about translation of generic strings such as "%s: %s". My > first impression is that they shouldn't be translated, but maybe it is > important that they are for languages I don't know nothing about such as > Japanese. I misunde

Re: [HACKERS] pg_rewind and log messages

2015-04-06 Thread Alvaro Herrera
Fujii Masao wrote: > On Mon, Apr 6, 2015 at 5:33 PM, Michael Paquier > wrote: > > On Mon, Apr 6, 2015 at 1:41 PM, Michael Paquier wrote: > >> I guess that you are working on a patch? If not, you are looking for one? > > > > Code-speaking, this gives the patch attached. > > Thanks! Here are the re

Re: [HACKERS] pg_rewind and log messages

2015-04-06 Thread Fujii Masao
On Mon, Apr 6, 2015 at 5:33 PM, Michael Paquier wrote: > On Mon, Apr 6, 2015 at 1:41 PM, Michael Paquier wrote: >> I guess that you are working on a patch? If not, you are looking for one? > > Code-speaking, this gives the patch attached. Thanks! Here are the review comments: I'm not familiar wi

Re: [HACKERS] pg_rewind and log messages

2015-04-06 Thread Michael Paquier
On Mon, Apr 6, 2015 at 1:41 PM, Michael Paquier wrote: > I guess that you are working on a patch? If not, you are looking for one? Code-speaking, this gives the patch attached. I eliminated a bunch of newlines in the log messages that seemed really unnecessary to me, simplifying a bit the whole. W

Re: [HACKERS] pg_rewind and log messages

2015-04-05 Thread Michael Paquier
On Mon, Apr 6, 2015 at 12:57 PM, Fujii Masao wrote: > (1) > It outputs an error message to stdout not stderr. > (2) > The tool name should be added at the head of log message as follows, > but not in pg_rewind. > > pg_basebackup: no target directory specified Agreed. That's inconsistent. > (