Re: Replication protocol pipelining edge case - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Replication protocol pipelining edge case
Date
Msg-id 2c686eeeff7049e7500303248502aaebd876c649.camel@j-davis.com
Whole thread Raw
In response to Replication protocol pipelining edge case  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Tue, 2021-01-05 at 09:17 -0800, Jeff Davis wrote:
> The reason I ask is because it makes clients that do pipelining more
> complex. If the server always enters copy mode, then the client can
> send a CopyDone and then pipeline more requests behind it. But if the
> server may or may not enter copy mode, then the client needs to wait
> until it sees a CopyBothResponse before any new requests can be
> pipelined.

In an offline conversation with Andres, he pointed out that we can
never be sure that we'll enter COPY mode, because the START_REPLICATION
command could throw an error. Therefore we need to always wait for the
CopyBothResponse, and can't pipeline any new commands until we get it.

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Single transaction in the tablesync worker?
Next
From: Craig Ringer
Date:
Subject: Re: [PATCH] Runtime control of CLOBBER_CACHE_ALWAYS