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

Commitc1d1ae1

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 parent8aed7f7 commitc1d1ae1

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
@@ -399,6 +399,8 @@ XLogRegisterBufData(uint8 block_id, char *data, int len)
399399
* - XLOG_MARK_UNIMPORTANT, to signal that the record is not important for
400400
* durability, which allows to avoid triggering WAL archiving and other
401401
* background activity.
402+
* - XLOG_INCLUDE_XID, a message-passing hack between XLogRecordAssemble
403+
* and XLogResetInsertion.
402404
*/
403405
void
404406
XLogSetRecordFlags(uint8flags)

‎src/include/access/xlog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ extern bool XLOG_DEBUG;
246246
*/
247247
#defineXLOG_INCLUDE_ORIGIN0x01/* include the replication origin */
248248
#defineXLOG_MARK_UNIMPORTANT0x02/* record not important for durability */
249-
#defineXLOG_INCLUDE_XID0x04/*include XID of top-level xact */
249+
#defineXLOG_INCLUDE_XID0x04/*WAL-internal message-passing hack */
250250

251251

252252
/* Checkpoint statistics */

‎src/include/access/xlogrecord.h

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp