Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitade24da

Browse files
committed
Document XLOG_INCLUDE_XID a little better
I noticed that commit0bead9a left this flag undocumented inXLogSetRecordFlags, which led me to discover that the flag doesn'tactually do what the one comment on it said it does. Improve thesituation by adding some more comments.Backpatch to 14, where the aforementioned commit appears.Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/202109212119.c3nhfp64t2ql@alvherre.pgsql
1 parent43c1c4f commitade24da

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

‎src/backend/access/transam/xloginsert.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ XLogRegisterBufData(uint8 block_id, char *data, int len)
409409
* - XLOG_MARK_UNIMPORTANT, to signal that the record is not important for
410410
* durability, which allows to avoid triggering WAL archiving and other
411411
* background activity.
412+
* - XLOG_INCLUDE_XID, a message-passing hack between XLogRecordAssemble
413+
* and XLogResetInsertion.
412414
*/
413415
void
414416
XLogSetRecordFlags(uint8flags)

‎src/include/access/xlog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extern bool XLOG_DEBUG;
212212
*/
213213
#defineXLOG_INCLUDE_ORIGIN0x01/* include the replication origin */
214214
#defineXLOG_MARK_UNIMPORTANT0x02/* record not important for durability */
215-
#defineXLOG_INCLUDE_XID0x04/*include XID of top-level xact */
215+
#defineXLOG_INCLUDE_XID0x04/*WAL-internal message-passing hack */
216216

217217

218218
/* Checkpoint statistics */

‎src/include/access/xlogrecord.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ typedef struct XLogRecordDataHeaderLong
215215
* Block IDs used to distinguish different kinds of record fragments. Block
216216
* references are numbered from 0 to XLR_MAX_BLOCK_ID. A rmgr is free to use
217217
* any ID number in that range (although you should stick to small numbers,
218-
* because the WAL machinery is optimized for that case). A couple of ID
219-
* numbers are reserved to denote the "main" data portion of the record.
218+
* because the WAL machinery is optimized for that case). A few ID
219+
* numbers are reserved to denote the "main" data portion of the record,
220+
* as well as replication-supporting transaction metadata.
220221
*
221222
* The maximum is currently set at 32, quite arbitrarily. Most records only
222223
* need a handful of block references, but there are a few exceptions that

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp