Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ufFaK-004UrC-Ph for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jul 2025 10:23:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ufFaJ-00GyXv-HI for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jul 2025 10:23:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ufFaI-00GyVl-TX for pgsql-hackers@lists.postgresql.org; Fri, 25 Jul 2025 10:23:27 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ufFaF-000lGb-1C for pgsql-hackers@lists.postgresql.org; Fri, 25 Jul 2025 10:23:26 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 39A3E7A0207; Fri, 25 Jul 2025 06:23:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 25 Jul 2025 06:23:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1753439002; x= 1753525402; bh=qfse1u0nUJpHaUPJLhwLizkPEMrQdppwE4m/nw7VxcY=; b=Y wvpbu94dsi/TkplE+wQOI7fUQ3eYJkGLb4liZXWneIZ/N6/M8NXY60DVmrXCWMVb FVZ7vJNeTJgWRd5boYCH6lzhRITx3GNHbfrcYe0t6nJriXmWK/H0fZ/t7h98q+ja xYl9Z+2hXzRyfbjD/1Tbytyg9pg6XD+qGAihsaK4+KrxCcDcReu9dYdIPVYxt4j2 TcwfLlrrwssrTejQe2TXIUH6WVAKwTyH8GKplbKhibgfb0aAc7CRaXobZsH5rTXd qKVJoyapgYZUhERac5JBA0WjJi4XlUS6WCB3I/6ozBH3iK10tuM46NePYqfXdWpk c20IA8oRYGUsCLPMEmPyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1753439002; x=1753525402; bh=q fse1u0nUJpHaUPJLhwLizkPEMrQdppwE4m/nw7VxcY=; b=K7J786804l5tiV0ZF 4HRYgoIDGA9k1ZaXM5eMaDDM8H1B96u7EUogF6wDuxjfv6TH44np3b4yp4ExUZlb 6yfAVLXV/w47Ey/jf5/y4C5FYofO3kofAsT4+5FrZagKjd4tmLYLPyLRSq0Of5yr gEa+FDHyat5vubW/gDvkfvOykGpUBBGkQCn9Y1aAFgbYi6l/Mte/VJEIO8PNhh6k d7I7KEoe6Th67zUQPNxwR6Mxt5ldw+xEBOXGe1w+Jy8xepCHomF54XCoRE+R+qtJ CPi/aBVTjIoMYMmpRR2ySHUYj88+qjx0cXQfnDQCARA4IagSMnzZxAAQvpuzeiZT gthIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdekfedvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehmkeerredttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgeqnecuggftrf grthhtvghrnhepuefgkeektdejudfhueefhfejvefhffefvddvvdefjeejhfeukedtgeef tdevgeejnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtth hopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjrggtohgsrdgthhgrmhhp ihhonhesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtohepuggrvhgvtghrrg hmvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepnhgrthhhrghnuggsohhsshgrrhht sehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhish htshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Jul 2025 06:23:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1753438998; bh=21iYeQdXRa5YW3m7fmARd07KAcQspoF9lOOzngi/Zdc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kH8Y5AxRWVhipPn/63XXsL2/xuco6ErHtz3FAFe2cOWq8Ikwf13cKcOYTTgwE0151 hf4cFTnLgPvp2asq1lvgx+EkTLI2R2lmOwplfIxYm0p0rrsemQiPGaE+o+T1RJQrJ/ A0aIj9PYo2+MGSPGezV54DtKqjGb8FicYSoLZjcZaQgWUQB54/ceupefA84QTt+hmt RLNPeOF48sIABYiaTv//HFJyapC3588YN537lb04f1RG3qci5dhHma2FBoefq2iXi5 mb7D4T/Aq6amXPPHX8f1kJel0urec3zUuqTL3cug/1kyISZ/Un+ds7vAQ8GlmaUUGI f+MNMNW8KS+0w== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 6432490; Fri, 25 Jul 2025 12:23:18 +0200 (CEST) Date: Fri, 25 Jul 2025 12:23:18 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Dave Cramer Cc: Jacob Champion , Nathan Bossart , PostgreSQL Hackers Subject: Re: More protocol.h replacements this time into walsender.c Message-ID: <202507251023.ddvb5pfuz6kf@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xa2y2hvoojiuy5us" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xa2y2hvoojiuy5us Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ --xa2y2hvoojiuy5us Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-rename-XLogData-to-WALData.patch" From de850f70b793f27c0aaa5a1f8589d44450691767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Herrera?= Date: Fri, 25 Jul 2025 12:12:03 +0200 Subject: [PATCH] rename XLogData to WALData --- doc/src/sgml/protocol.sgml | 8 ++++---- src/bin/pg_basebackup/pg_recvlogical.c | 4 ++-- src/bin/pg_basebackup/receivelog.c | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index b115884acb3..eadac60224e 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -2550,8 +2550,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" - - XLogData (B) + + WALData (B) @@ -2599,11 +2599,11 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" - A single WAL record is never split across two XLogData messages. + A single WAL record is never split across two WALData messages. When a WAL record crosses a WAL page boundary, and is therefore already split using continuation records, it can be split at the page boundary. In other words, the first main WAL record and its - continuation records can be sent in different XLogData messages. + continuation records can be sent in different WALData messages. diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 8a5dd24e6c9..0e9d2e23947 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -517,7 +517,7 @@ StreamLogicalLog(void) } /* - * Read the header of the XLogData message, enclosed in the CopyData + * Read the header of the WALData message, enclosed in the CopyData * message. We only need the WAL location field (dataStart), the rest * of the header is ignored. */ @@ -605,7 +605,7 @@ StreamLogicalLog(void) /* * We're doing a client-initiated clean exit and have sent CopyDone to * the server. Drain any messages, so we don't miss a last-minute - * ErrorResponse. The walsender stops generating XLogData records once + * ErrorResponse. The walsender stops generating WALData records once * it sees CopyDone, so expect this to finish quickly. After CopyDone, * it's too late for sendFeedback(), even if this were to take a long * time. Hence, use synchronous-mode PQgetCopyData(). diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index d6b7f117fa3..f2b54d3c501 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -38,8 +38,8 @@ static int CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket, char **buffer); static bool ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, XLogRecPtr blockpos, TimestampTz *last_status); -static bool ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, - XLogRecPtr *blockpos); +static bool ProcessWALDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, + XLogRecPtr *blockpos); static PGresult *HandleEndOfCopyStream(PGconn *conn, StreamCtl *stream, char *copybuf, XLogRecPtr blockpos, XLogRecPtr *stoppos); static bool CheckCopyStreamStop(PGconn *conn, StreamCtl *stream, XLogRecPtr blockpos); @@ -831,7 +831,7 @@ HandleCopyStream(PGconn *conn, StreamCtl *stream, } else if (copybuf[0] == 'w') { - if (!ProcessXLogDataMsg(conn, stream, copybuf, r, &blockpos)) + if (!ProcessWALDataMsg(conn, stream, copybuf, r, &blockpos)) goto error; /* @@ -1041,11 +1041,11 @@ ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, } /* - * Process XLogData message. + * Process WALData message. */ static bool -ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, - XLogRecPtr *blockpos) +ProcessWALDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, + XLogRecPtr *blockpos) { int xlogoff; int bytes_left; @@ -1054,13 +1054,13 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, /* * Once we've decided we don't want to receive any more, just ignore any - * subsequent XLogData messages. + * subsequent WALData messages. */ if (!(still_sending)) return true; /* - * Read the header of the XLogData message, enclosed in the CopyData + * Read the header of the WALData message, enclosed in the CopyData * message. We only need the WAL location field (dataStart), the rest of * the header is ignored. */ @@ -1162,7 +1162,7 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, return false; } still_sending = false; - return true; /* ignore the rest of this XLogData packet */ + return true; /* ignore the rest of this WALData packet */ } } } -- 2.39.5 --xa2y2hvoojiuy5us--