From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improvement of log messages in pg_basebackup |
Date: | 2012-03-28 12:44:17 |
Message-ID: | CA+TgmoboGtNSxVptC-zSKGa1+qum0Y_YGtTq77nVwGXPbeixNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 27, 2012 at 5:25 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> fprintf(stderr, _("%s: could not identify system: %s\n"),
>> progname, PQerrorMessage(conn));
>
> Since PQerrorMessage() result includes a trailing newline, the above
> log message in pg_basebackup doesn't need to include a trailing \n.
> Attached patch gets rid of that \n.
>
>> res = PQgetResult(conn);
>> if (PQresultStatus(res) != PGRES_TUPLES_OK)
>> {
>> fprintf(stderr, _("%s: could not get WAL end position from server\n"),
>> progname);
>
> ISTM it's worth including PQerrorMessage() result in the above log
> message, to diagnose the cause of error. Attached patch does that.
Committed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2012-03-28 12:46:26 | Re: Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing |
Previous Message | Robert Haas | 2012-03-28 12:40:15 | Re: PATCH: pg_basebackup (missing exit on error) |