Re: Rework subscription-related code for psql and pg_dump

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-03T00:50:04Z
Lists: pgsql-hackers
On Sat, Nov 30, 2024 at 12:54:19PM +0900, Michael Paquier wrote:
> -   if (strcmp(subinfo->subtwophasestate, two_phase_disabled) != 0)
> +   if (subinfo->subtwophasestate != LOGICALREP_TWOPHASE_STATE_DISABLED)
>         appendPQExpBufferStr(query, ", two_phase = on");
> 
> I'm not feeling strongly either way.  The code intentionally wants to
> set two_phase to "on" if the catalog state is "pending" or "on", so
> sticking with the current assumption of the code and keeping it as
> proposed in the patch is fine, IMO.

I've looked at that again and let this as-is, then applied all this
cleanup.
--
Michael

Commits

  1. Rework some code handling pg_subscription data in psql and pg_dump