Re: More protocol.h replacements this time into walsender.c - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: More protocol.h replacements this time into walsender.c
Date
Msg-id CAOYmi+nQ75D+OcyDa0cH3q5Hh_vioErtDgXHMaNGK4xfeG2EPA@mail.gmail.com
Whole thread Raw
In response to Re: More protocol.h replacements this time into walsender.c  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: More protocol.h replacements this time into walsender.c
List pgsql-hackers
On Mon, Aug 4, 2025 at 12:56 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> 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.

May I ask why? These messages are legitimately different; they're
tunneled through CopyData, so their reservations don't collide with
the top-level codes.

> 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?

My vote would be to add another. 'p' is a password message in the
top-level protocol (one of many, actually), a progress message in a
backup stream, and a status request in a replication stream, so I
think they deserve their own namespaces.

--Jacob



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Improve LWLock tranche name visibility across backends
Next
From: Nathan Bossart
Date:
Subject: Re: More protocol.h replacements this time into walsender.c