From: Nathan Bossart <nathandbossart@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Dave Cramer <davecramer@gmail.com>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: More protocol.h replacements this time into walsender.c
Date: Mon, 4 Aug 2025 14:56:01 -0500
Message-ID: <aJEQUTYLkS836qu5@nathan> (raw)
In-Reply-To: <202508041231.myxuzx2udlze@alvherre.pgsql>
References: <CADK3HHLs-8fTiYikJBU45bkMYABVifkYPQU9s3vwO4EUcuOo=w@mail.gmail.com>
<202508041231.myxuzx2udlze@alvherre.pgsql>
On Mon, Aug 04, 2025 at 02:31:05PM +0200, Álvaro Herrera wrote:
> +/* Replication Protocol, sent by the primary */
> +
> +#define PqReplMsg_WALData 'w'
> +#define PqReplMsg_PrimaryKeepAlive 'k'
> +#define PqReplMsg_PrimaryStatusUpdate 's'
> +
> +/* Replication Protocol, sent by the standby */
> +
> +#define PqReplMsg_StandbyStatus 'r'
> +#define PqReplMsg_HotStandbyFeedback 'h'
> +#define PqReplMsg_RequestPrimaryStatus 'p'
I know I previously +1'd a new prefix for these, but upon further review,
I'm not so sure about that. The replication protocol uses many of the
existing PqMsg macros already, so it would be a little strange if only a
subset of the replication protocol messages used the special prefix. And
IMO it would also be weird to duplicate all the macros used by both
protocols. There's also backups, which use the replication protocol but
have their own special characters [0]. If we're going the prefix route,
would we add another prefix for those, or use the replication one?
[0] https://postgr.es/m/aIOkE7fgvFOu0FI_%40nathan
--
nathan
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: nathandbossart@gmail.com, alvherre@kurilemu.de, davecramer@gmail.com, jacob.champion@enterprisedb.com, pgsql-hackers@lists.postgresql.org
Subject: Re: More protocol.h replacements this time into walsender.c
In-Reply-To: <aJEQUTYLkS836qu5@nathan>
* 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