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

Commit9e41148

Browse files
committed
Fix under-parenthesized XLogRecHasBlockRef() macro.
Commitf003d9f left this macro with inadequate (or, one could say,too much) parenthesization. Which was catastrophic to the correctnessof calls such as "if (!XLogRecHasBlockRef(record, 1)) ...". Thereare only a few of those, which perhaps explains why we didn't noticeimmediately (with our general weakness of WAL replay testing beinganother factor). I found it by debugging intermittent replay failureslike2021-04-08 14:33:30.191 EDT [29463] PANIC: failed to locate backup block with ID 12021-04-08 14:33:30.191 EDT [29463] CONTEXT: WAL redo at 0/95D3438 for SPGist/ADD_NODE: off 1; blkref #0: rel 1663/16384/25998, blk 1
1 parentdb01f79 commit9e41148

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/include/access/xlogreader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ extern bool DecodeXLogRecord(XLogReaderState *state,
385385
#defineXLogRecMaxBlockId(decoder) ((decoder)->record->max_block_id)
386386
#defineXLogRecGetBlock(decoder,i) (&(decoder)->record->blocks[(i)])
387387
#defineXLogRecHasBlockRef(decoder,block_id) \
388-
((decoder)->record->max_block_id >= (block_id)) && \
389-
((decoder)->record->blocks[block_id].in_use)
388+
((decoder)->record->max_block_id >= (block_id) && \
389+
(decoder)->record->blocks[block_id].in_use)
390390
#defineXLogRecHasBlockImage(decoder,block_id) \
391391
((decoder)->record->blocks[block_id].has_image)
392392
#defineXLogRecBlockImageApply(decoder,block_id) \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp