Re: Replication protocol doc fix - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Replication protocol doc fix
Date
Msg-id CA+TgmoZa-3zTU1_2odkwWMvdhEfFyuz_XDzMxgKtW-VyWzQD_g@mail.gmail.com
Whole thread Raw
In response to Re: Replication protocol doc fix  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Replication protocol doc fix  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Fri, Jul 2, 2021 at 1:55 AM Jeff Davis <pgsql@j-davis.com> wrote:
> 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.

Right, that seems like a good goal. Thinking about this a little more,
it's only holding off *cancel* interrupts, not *all* interrupts, so
presumably you can still terminate the backend in this state. That's
not so bad, and it's not clear how we could do any better. So I
withdraw my previous complaint about this point.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM
Next
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE