Skip to content

Commit 0768444

Browse files
author
Álvaro Herrera
committed
Rename XLogData protocol message to WALData
This name is only used as documentation, and using this name is consistent with its byte being a 'w'. Renaming it would also make the use of a symbolic name based on the word "WAL" rather than the obsolete "XLog" term more consistent, per future commits along the lines of 37c7a7e, 4a68d50, f4b54e1. Discussion: https://postgr.es/m/aIECfYfevCUpenBT@nathan
1 parent 4614d53 commit 0768444

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

doc/src/sgml/protocol.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,8 +2555,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
25552555
</para>
25562556

25572557
<variablelist>
2558-
<varlistentry id="protocol-replication-xlogdata">
2559-
<term>XLogData (B)</term>
2558+
<varlistentry id="protocol-replication-waldata">
2559+
<term>WALData (B)</term>
25602560
<listitem>
25612561
<variablelist>
25622562
<varlistentry>
@@ -2604,11 +2604,11 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
26042604
</para>
26052605

26062606
<para>
2607-
A single WAL record is never split across two XLogData messages.
2607+
A single WAL record is never split across two WALData messages.
26082608
When a WAL record crosses a WAL page boundary, and is therefore
26092609
already split using continuation records, it can be split at the page
26102610
boundary. In other words, the first main WAL record and its
2611-
continuation records can be sent in different XLogData messages.
2611+
continuation records can be sent in different WALData messages.
26122612
</para>
26132613
</listitem>
26142614
</varlistentry>

src/bin/pg_basebackup/pg_recvlogical.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ StreamLogicalLog(void)
517517
}
518518

519519
/*
520-
* Read the header of the XLogData message, enclosed in the CopyData
520+
* Read the header of the WALData message, enclosed in the CopyData
521521
* message. We only need the WAL location field (dataStart), the rest
522522
* of the header is ignored.
523523
*/
@@ -605,7 +605,7 @@ StreamLogicalLog(void)
605605
/*
606606
* We're doing a client-initiated clean exit and have sent CopyDone to
607607
* the server. Drain any messages, so we don't miss a last-minute
608-
* ErrorResponse. The walsender stops generating XLogData records once
608+
* ErrorResponse. The walsender stops generating WALData records once
609609
* it sees CopyDone, so expect this to finish quickly. After CopyDone,
610610
* it's too late for sendFeedback(), even if this were to take a long
611611
* time. Hence, use synchronous-mode PQgetCopyData().

src/bin/pg_basebackup/receivelog.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static int CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket,
3838
char **buffer);
3939
static bool ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf,
4040
int len, XLogRecPtr blockpos, TimestampTz *last_status);
41-
static bool ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
42-
XLogRecPtr *blockpos);
41+
static bool ProcessWALDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
42+
XLogRecPtr *blockpos);
4343
static PGresult *HandleEndOfCopyStream(PGconn *conn, StreamCtl *stream, char *copybuf,
4444
XLogRecPtr blockpos, XLogRecPtr *stoppos);
4545
static bool CheckCopyStreamStop(PGconn *conn, StreamCtl *stream, XLogRecPtr blockpos);
@@ -831,7 +831,7 @@ HandleCopyStream(PGconn *conn, StreamCtl *stream,
831831
}
832832
else if (copybuf[0] == 'w')
833833
{
834-
if (!ProcessXLogDataMsg(conn, stream, copybuf, r, &blockpos))
834+
if (!ProcessWALDataMsg(conn, stream, copybuf, r, &blockpos))
835835
goto error;
836836

837837
/*
@@ -1041,11 +1041,11 @@ ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
10411041
}
10421042

10431043
/*
1044-
* Process XLogData message.
1044+
* Process WALData message.
10451045
*/
10461046
static bool
1047-
ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
1048-
XLogRecPtr *blockpos)
1047+
ProcessWALDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
1048+
XLogRecPtr *blockpos)
10491049
{
10501050
int xlogoff;
10511051
int bytes_left;
@@ -1054,13 +1054,13 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
10541054

10551055
/*
10561056
* Once we've decided we don't want to receive any more, just ignore any
1057-
* subsequent XLogData messages.
1057+
* subsequent WALData messages.
10581058
*/
10591059
if (!(still_sending))
10601060
return true;
10611061

10621062
/*
1063-
* Read the header of the XLogData message, enclosed in the CopyData
1063+
* Read the header of the WALData message, enclosed in the CopyData
10641064
* message. We only need the WAL location field (dataStart), the rest of
10651065
* the header is ignored.
10661066
*/
@@ -1162,7 +1162,7 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
11621162
return false;
11631163
}
11641164
still_sending = false;
1165-
return true; /* ignore the rest of this XLogData packet */
1165+
return true; /* ignore the rest of this WALData packet */
11661166
}
11671167
}
11681168
}

0 commit comments

Comments
 (0)