Re: Inconsistent error handling in START_REPLICATION command

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: Inconsistent error handling in START_REPLICATION command
Дата
Msg-id 56E2F400.2000709@pgmasters.net
обсуждение исходный текст
Ответ на Re: Inconsistent error handling in START_REPLICATION command  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Ответы Re: Inconsistent error handling in START_REPLICATION command  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 1/21/16 9:53 AM, Shulgin, Oleksandr wrote:
On Thu, Jan 21, 2016 at 3:25 PM, Robert Haas <robertmhaas@gmail.com> wrote:

So it's true that the client can't unilaterally terminate COPY BOTH
mode; it can only send CopyDone.  But an error on the server side
should do so.

Hm, you're right.  Even though the server sends COPY_BOTH message before the plugin startup, an attempt by the client to actually read the data messages results in ErrorResponse handled on the client, then the client can re-submit the corrected START_REPLICATION command and continue without the need to reconnect.  This cannot be actually tested in psql, but I can verify the behavior with my python scripts.

Then I don't have a preference for the early error reporting in this case.  If the current behavior potentially allows for more flexible error reporting, I'm for keeping it.

It looks like a decision needs to be made here whether to apply this patch, send it back to the author, or reject it so I'm marking it "Ready for Committer".

Robert, since you were participating in this conversation can you have a look?

-- 
-David
david@pgmasters.net
Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: auto_explain sample rate
Следующее
От: Jesper Pedersen
Дата:
Сообщение: Re: Speedup twophase transactions