Re: More protocol.h replacements this time into walsender.c
Dave Cramer <davecramer@gmail.com>
From: Dave Cramer <davecramer@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-24T19:03:45Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Expand usage of macros for protocol characters.
- 9ea3b6f751ab 19 (unreleased) landed
-
Rename XLogData protocol message to WALData
- 07684443b1e0 19 (unreleased) landed
-
Use PqMsg_* macros in walsender.c
- 37c7a7eeb6d1 19 (unreleased) landed
Attachments
- 0001-replace-protocol-replication-constants-with-named-co.patch (application/octet-stream) patch 0001
On Thu, 24 Jul 2025 at 05:34, Dave Cramer <davecramer@gmail.com> wrote: > > > > On Wed, 23 Jul 2025 at 11:40, Nathan Bossart <nathandbossart@gmail.com> > 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: case 'h': >> 2361: case 'p': >> 2755: pq_sendbyte(&output_message, 's'); >> 3367: pq_sendbyte(&output_message, 'w'); >> 4138: pq_sendbyte(&output_message, 'k'); >> >> In walreceiver.c: >> >> 829: case 'w': /* WAL >> records */ >> 853: case 'k': /* >> Keepalive */ >> 1133: pq_sendbyte(&reply_message, 'r'); >> 1237: pq_sendbyte(&reply_message, 'h'); >> >> In logical/worker.c: >> >> 3854: if (c == 'w') >> 3876: else if (c == 'k') >> 3895: else if (c == 's') /* >> Primary status update */ >> 4127: pq_sendbyte(reply_message, 'r'); >> 4298: pq_sendbyte(request_message, 'p'); >> > > Interesting, yes I will add those > Patch attached Dave Cramer > >>