Re: pg_basebackup: Missing newlines in some error messages

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_basebackup: Missing newlines in some error messages
Дата
Msg-id 20180321125708.i3bkpdxxaarky7fi@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pg_basebackup: Missing newlines in some error messages  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Hi
> 
> Michael Banck wrote:
> 
> > I apparently managed to screw up so badly that no PQerrorMessage was
> > set, so saw the above (which indeed has no error message after the
> > colon).
> 
> Well, maybe that's a different bug, then: maybe we should print
> something other than PQerrorMessage (or maybe PQerrorMessage should not
> return empty!).  Can you reproduce the problem?

The code does look a bit weird,

    /*
     * Get the COPY data
     */
    res = PQgetResult(conn);
    if (PQresultStatus(res) != PGRES_COPY_OUT)
    {
        fprintf(stderr, _("%s: could not get COPY data stream: %s"),
                progname, PQerrorMessage(conn));

Note that noplace we check that there is actually an error.  So maybe
the conn got a result status other than COPY_OUT that's not an error ...

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_basebackup: Missing newlines in some error messages
Следующее
От: Michael Banck
Дата:
Сообщение: Re: pg_basebackup: Missing newlines in some error messages