Re: More protocol.h replacements this time into walsender.c

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: More protocol.h replacements this time into walsender.c
Дата
Msg-id aJEQUTYLkS836qu5@nathan
обсуждение исходный текст
Ответ на Re: More protocol.h replacements this time into walsender.c  (Álvaro Herrera <alvherre@kurilemu.de>)
Ответы Re: More protocol.h replacements this time into walsender.c
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: