Re: Replication protocol doc fix
От
Jeff Davis
Тема
Re: Replication protocol doc fix
Дата
Msg-id
c82231a3ea45a75ee44b50463fa82ad66ab1a003.camel@j-davis.com
Ответ на
Re: Replication protocol doc fix (Robert Haas)
Список
Дерево обсуждения
Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
Re: Replication protocol doc fix Robert Haas <robertmhaas@gmail.com>
Re: Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
Re: Replication protocol doc fix Robert Haas <robertmhaas@gmail.com>
Re: Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
Re: Replication protocol doc fix Tom Lane <tgl@sss.pgh.pa.us>
Re: Replication protocol doc fix Robert Haas <robertmhaas@gmail.com>
Re: Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
Re: Replication protocol doc fix Andres Freund <andres@anarazel.de>
Re: Replication protocol doc fix Daniel Gustafsson <daniel@yesql.se>
Re: Replication protocol doc fix Daniel Gustafsson <daniel@yesql.se>
Re: Replication protocol doc fix Robert Haas <robertmhaas@gmail.com>
Re: Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
Re: Replication protocol doc fix Robert Haas <robertmhaas@gmail.com>
Re: Replication protocol doc fix Jeff Davis <pgsql@j-davis.com>
On Wed, 2021-06-30 at 12:25 -0400, Robert Haas wrote:
> I am not sure whether this works or not. Holding off cancel
> interrupts
> across possible network I/O seems like a non-starter. We have to be
> able to kill off connections that have wedged.
I was following a pattern that I saw in CopyGetData() and
SocketBackend(). If I understand correctly, the idea is to avoid a
cancel leaving part of a message unread, which would desync the
protocol.
> Also, if we have to
> postpone sending ErrorResponse until we see the Sync, that's also
> bad:
> I think we need to be able to error out whenever.
I think we could still send an ErrorResponse whenever we want, and then
just ignore messages until we get a Sync (just like for an ordinary
extended protocol sequence).
> But, hmm, maybe it's
> OK to send ErrorResponse either before or after sending
> Copy{In,Both}Response. Then the client knows that if ErrorResponse
> shows up before Copy{In,Both}Response, the server sent it before
> consuming the Sync and will stop skipping messages when it sees the
> Sync; whereas if the ErrorResponse shows up after the
> Copy{In,Both}Response then the client knows the Sync was eaten and it
> has to send another one.
That's what I had in mind.
Regards,
Jeff Davis
В списке pgsql-hackers по дате отправления
От: vignesh C
Дата: