From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Replication protocol pipelining edge case
Date: Tue, 05 Jan 2021 15:23:34 -0800
Message-ID: <2c686eeeff7049e7500303248502aaebd876c649.camel@j-davis.com> (raw)
In-Reply-To: <0a2c985ebcaa1acd385350aeba561b6509187394.camel@j-davis.com>
References: <0a2c985ebcaa1acd385350aeba561b6509187394.camel@j-davis.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com
Subject: Re: Replication protocol pipelining edge case
In-Reply-To: <2c686eeeff7049e7500303248502aaebd876c649.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox