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

2025-08-06 Thread Nathan Bossart
Committed. -- nathan

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

2025-08-06 Thread Nathan Bossart
On Wed, Aug 06, 2025 at 02:54:13PM -0300, Euler Taveira wrote: > I tried to apply your patch and it says > > $ git am -3 v5-0001-Expand-usage-of-protocol-characters.patch > Applying: Expand usage of protocol characters. > Warning: commit message did not conform to UTF-8. > You may want to amend it

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

2025-08-06 Thread Euler Taveira
On Wed, Aug 6, 2025, at 12:26 AM, Nathan Bossart wrote: > Okay, I think I've addressed all the latest feedback in v5. > LGTM. I tried to apply your patch and it says $ git am -3 v5-0001-Expand-usage-of-protocol-characters.patch Applying: Expand usage of protocol characters. Warning: commit messa

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

2025-08-06 Thread Álvaro Herrera
On 2025-Aug-05, Nathan Bossart wrote: > Okay, I think I've addressed all the latest feedback in v5. LGTM. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Nunca confiaré en un traidor. Ni siquiera si el traidor lo he creado yo" (Barón Vladimir Harkonnen)

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

2025-08-05 Thread Nathan Bossart
Okay, I think I've addressed all the latest feedback in v5. -- nathan >From 00540a80854d3fc598a4b99daddfe1e7c0817b5c Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 5 Aug 2025 22:18:11 -0500 Subject: [PATCH v5 1/1] Expand usage of protocol characters. MIME-Version: 1.0 Content-Type: tex

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

2025-08-05 Thread Euler Taveira
On Tue, Aug 5, 2025, at 4:58 PM, Nathan Bossart wrote: > Here is an updated patch that includes 1) added uses of PqMsg_* macros, 2) > new PqReplMsg_* macros, and 3) new PqBackupMsg_* macros. Thoughts? > -* 'd' means a standby reply wrapped in a CopyData packet. +*

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

2025-08-05 Thread Álvaro Herrera
On 2025-Aug-05, Nathan Bossart wrote: > Here is an updated patch that includes 1) added uses of PqMsg_* macros, 2) > new PqReplMsg_* macros, and 3) new PqBackupMsg_* macros. Thoughts? Hmm, I think if you're going to add the backup ones, then it'd be good to update ReceiveArchiveStreamChunk() to

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

2025-08-05 Thread Nathan Bossart
Here is an updated patch that includes 1) added uses of PqMsg_* macros, 2) new PqReplMsg_* macros, and 3) new PqBackupMsg_* macros. Thoughts? -- nathan >From 6a1d03725009837c5ce99dcfc283fa565d587d13 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 5 Aug 2025 14:53:42 -0500 Subject: [PAT

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

2025-08-04 Thread Nathan Bossart
On Mon, Aug 04, 2025 at 02:11:26PM -0700, Jacob Champion wrote: > On Mon, Aug 4, 2025 at 12:56 PM Nathan Bossart > 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 th

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

2025-08-04 Thread Jacob Champion
On Mon, Aug 4, 2025 at 12:56 PM Nathan Bossart 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 diff

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

2025-08-04 Thread Nathan Bossart
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' > + > +/* Replic

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

2025-08-04 Thread Álvaro Herrera
On 2025-Jul-28, Dave Cramer wrote: > I chose PqReplMsg patch attached I think you sent a patch that applied on top of your previous patch instead of a patch on top of master. Here it is as a standalone patch. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ >Fro

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

2025-08-04 Thread Álvaro Herrera
On 2025-Jul-25, Nathan Bossart wrote: > On Fri, Jul 25, 2025 at 06:28:28AM -0400, Dave Cramer wrote: > > On Fri, 25 Jul 2025 at 06:23, Álvaro Herrera wrote: > >> Yeah, we could rename it, as in the attached. It doesn't harm anything. > > > > Consistency is good. If your patch were applied, then

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

2025-07-28 Thread Dave Cramer
On Fri, 25 Jul 2025 at 10:38, Nathan Bossart wrote: > On Thu, Jul 24, 2025 at 05:39:14PM -0400, Dave Cramer wrote: > > On Thu, 24 Jul 2025 at 17:05, Jacob Champion < > > jacob.champ...@enterprisedb.com> wrote: > >> Since these are part of the replication subprotocol (i.e. tunneled, > >> via CopyD

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

2025-07-25 Thread Nathan Bossart
On Thu, Jul 24, 2025 at 05:39:14PM -0400, Dave Cramer wrote: > On Thu, 24 Jul 2025 at 17:05, Jacob Champion < > jacob.champ...@enterprisedb.com> wrote: >> Since these are part of the replication subprotocol (i.e. tunneled, >> via CopyData) rather than the top-level wire protocol, do they deserve >>

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

2025-07-25 Thread Nathan Bossart
On Fri, Jul 25, 2025 at 06:28:28AM -0400, Dave Cramer wrote: > On Fri, 25 Jul 2025 at 06:23, Álvaro Herrera wrote: >> Yeah, we could rename it, as in the attached. It doesn't harm anything. > > Consistency is good. If your patch were applied, then it would be > consistent to use WALData +1 --

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

2025-07-25 Thread Dave Cramer
On Fri, 25 Jul 2025 at 06:23, Álvaro Herrera wrote: > On 2025-Jul-25, Dave Cramer wrote: > > > FYI, the reason I used XLogData is because the term is used multiple > times > > here https://www.postgresql.org/docs/devel/protocol-replication.html > > Yeah, we could rename it, as in the attached. I

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

2025-07-25 Thread Álvaro Herrera
On 2025-Jul-25, Dave Cramer wrote: > FYI, the reason I used XLogData is because the term is used multiple times > here https://www.postgresql.org/docs/devel/protocol-replication.html Yeah, we could rename it, as in the attached. It doesn't harm anything. -- Álvaro HerreraBreisgau, Deut

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

2025-07-25 Thread Dave Cramer
Dave Cramer On Fri, 25 Jul 2025 at 04:11, Álvaro Herrera wrote: > On 2025-Jul-24, Dave Cramer wrote: > > > On Thu, 24 Jul 2025 at 17:05, Jacob Champion < > > jacob.champ...@enterprisedb.com> wrote: > > > > > On Thu, Jul 24, 2025 at 12:04 PM Dave Cramer > wrote: > > > > +/* Replication Protocol

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

2025-07-25 Thread Álvaro Herrera
On 2025-Jul-24, Dave Cramer wrote: > On Thu, 24 Jul 2025 at 17:05, Jacob Champion < > jacob.champ...@enterprisedb.com> wrote: > > > On Thu, Jul 24, 2025 at 12:04 PM Dave Cramer wrote: > > +/* Replication Protocol sent by the primary */ > > + > > +#define PqMsg_XlogData 'w' > > +#de

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

2025-07-24 Thread Dave Cramer
On Thu, 24 Jul 2025 at 16:49, Álvaro Herrera wrote: > Hello, > > Since this is a whole new symbol, I'd rather you use the term WAL rather > than Xlog ... > Fair enough Dave

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

2025-07-24 Thread Dave Cramer
On Thu, 24 Jul 2025 at 17:05, Jacob Champion < jacob.champ...@enterprisedb.com> wrote: > On Thu, Jul 24, 2025 at 12:04 PM Dave Cramer wrote: > > Patch attached > > +/* Replication Protocol sent by the primary */ > + > +#define PqMsg_XlogData 'w' > +#define PqMsg_PrimaryKeepAlive

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

2025-07-24 Thread Jacob Champion
On Thu, Jul 24, 2025 at 12:04 PM Dave Cramer wrote: > Patch attached +/* Replication Protocol sent by the primary */ + +#define PqMsg_XlogData 'w' +#define PqMsg_PrimaryKeepAlive 'k' +#define PqMsg_PrimaryStatusUpdate 's' + + +/* Replication Protocol sent by the standby */ + +

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

2025-07-24 Thread Álvaro Herrera
Hello, Since this is a whole new symbol, I'd rather you use the term WAL rather than Xlog ... -- Álvaro Herrera

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

2025-07-24 Thread Dave Cramer
On Thu, 24 Jul 2025 at 05:34, Dave Cramer wrote: > > > > On Wed, 23 Jul 2025 at 11:40, Nathan Bossart > wrote: > >> Committed. I noticed that there are several characters with no match in >> protocol.h. It might be worth adding those. >> >> In walsender.c: >> >> 1537: pq_sendbyte(ctx

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

2025-07-24 Thread Dave Cramer
On Wed, 23 Jul 2025 at 11:40, Nathan Bossart wrote: > Committed. I noticed that there are several characters with no match in > protocol.h. It might be worth adding those. > > In walsender.c: > > 1537: pq_sendbyte(ctx->out, 'w'); > 2353: case 'r': > 2357:

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

2025-07-23 Thread Nathan Bossart
Committed. I noticed that there are several characters with no match in protocol.h. It might be worth adding those. In walsender.c: 1537: pq_sendbyte(ctx->out, 'w'); 2353: case 'r': 2357: case 'h': 2361: case 'p': 2755: p

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

2025-07-22 Thread Nathan Bossart
On Tue, Jul 22, 2025 at 05:54:48PM -0400, Dave Cramer wrote: > Patch attached Thanks. I plan to look into committing this tomorrow. -- nathan