Hi,
> 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.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
On Tue, Mar 27, 2012 at 5:25 AM, Fujii Masao <masao.fujii@gmail.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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера