Re: Gripes about walsender command processing

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Gripes about walsender command processing
Date: 2020-09-15 21:33:16
Message-ID: 20200915213316.GA12416@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-09-15 21:38:15 Re: "Unified logging system" breaks access to pg_dump debug outputs
Previous Message Tom Lane 2020-09-15 21:30:15 Re: Subscription test 013_partition.pl fails under CLOBBER_CACHE_ALWAYS