Re: Replication protocol pipelining edge case

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Replication protocol pipelining edge case
Date: 2021-01-05 23:23:34
Message-ID: 2c686eeeff7049e7500303248502aaebd876c649.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2021-01-05 23:30:37 Re: [PATCH] Runtime control of CLOBBER_CACHE_ALWAYS
Previous Message Peter Smith 2021-01-05 23:02:11 Re: Single transaction in the tablesync worker?