Replication protocol doc fix

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Replication protocol doc fix
Дата
Msg-id c71317d9a1f486de00943cebc3ad1b27cf28d075.camel@j-davis.com
обсуждение исходный текст
Ответы Re: Replication protocol doc fix  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
The docs currently say (introduced in commit 91fa853):

"In the event of a backend-detected error during copy-both mode, the
backend will issue an ErrorResponse message, discard frontend messages
until a Sync message is received, and then issue ReadyForQuery and
return to normal processing."

But that doesn't seem to be correct: Sync is only used for the extended
query protocol, and CopyBoth can only be initiated with the simple
query protocol. So the actual behavior seems to be more like a "COPY
FROM STDIN" initiated with the simple query protocol:

"In the event of a backend-detected error during copy-in mode
(including receipt of a CopyFail message), the backend will issue an
ErrorResponse message. ... If the COPY command was issued in a simple
Query message, the rest of that message is discarded and ReadyForQuery
is issued ... any subsequent CopyData, CopyDone, or CopyFail messages
issued by the frontend will simply be dropped."

If the client does send a Sync, it results in an extra ReadyForQuery
message.

Diagnosed and reported by Petros Angelatos (petrosagg on Github).

Regards,
    Jeff Davis





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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Testing autovacuum wraparound (including failsafe)
Следующее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: locking [user] catalog tables vs 2pc vs logical rep