pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Gripes about walsender command processing
Date: Tue, 15 Sep 2020 18:33:16 -0300
Message-ID: <20200915213316.GA12416@alvherre.pgsql> (raw)
In-Reply-To: <1347966.1600195735@sss.pgh.pa.us>

On 2020-Sep-15, Tom Lane wrote:

> [ blink ... ]  So why is it that DropReplicationSlot does
> 
> 	SetQueryCompletion(&qc, CMDTAG_DROP_REPLICATION_SLOT, 0);
> 	EndCommand(&qc, DestRemote, false);
> 
> when the caller will immediately after that do
> 
> 	SetQueryCompletion(&qc, CMDTAG_SELECT, 0);
> 	EndCommand(&qc, DestRemote, true);
> 
> StartLogicalReplication has a similar weirdness.
> The more I look at this code, the more broken it seems.

I overlooked this in 2f9661311b83.  From this perspective, I agree it
looks wrong.  We still have to send *some* completion tag (the 'C'
message), but maybe we can invent a separate entry point in dest.c for
that -- EndReplicationCommand() or some such -- that takes values from a
separate enum?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (16+ messages)  latest in thread

Message-ID: <20200915213316.GA12416@alvherre.pgsql>
Permalink:  ../20200915213316.GA12416@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200915213316.GA12416@alvherre.pgsql

 · 

reply

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: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: Gripes about walsender command processing
  In-Reply-To: <20200915213316.GA12416@alvherre.pgsql>

* 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