Re: [HACKERS] walsender termination error messages worse in v10

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] walsender termination error messages worse in v10
Дата
Msg-id f7c7dd08-855c-e4ed-41f4-d064a6c0665a@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] walsender termination error messages worse in v10  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] walsender termination error messages worse in v10  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 02/06/17 23:45, Andres Freund wrote:
> Hi Petr,
> 
> On 2017-06-02 22:57:37 +0200, Petr Jelinek wrote:
>> On 02/06/17 20:51, Andres Freund wrote:
>>> I don't understand why the new block is there, nor does the commit
>>> message explain it.
>>>
>>
>> Hmm, that particular change can actually be reverted. It was needed for
>> one those custom replication commands which were replaced by normal
>> query support. I have missed it during the rewrite.
> 
> Doesn't appear to be quite that simple, I get regression test failures
> in that case.
> 

Hmm, looks like we still use it for normal COPY handling. So basically
the problem is that if we run COPY TO STDOUT and then consume it using
the libpqrcv_receive it will end with normal PGRES_COMMAND_OK but we
need to call PQgetResult() in that case otherwise libpq thinks the
command is still active and any following command will fail, but if we
call PQgetResult on dead connection we get that error you complained about.

I guess it would make sense to do conditional exit on
(PQstatus(streamConn) == CONNECTION_BAD) like libpqrcv_PQexec does. It's
quite ugly code-wise though.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

-- 
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 по дате отправления:

Предыдущее
От: Mark Rofail
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] logical replication - still unstable after all thesemonths