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

Commita88a18b

Browse files
committed
Assert only valid flag bits are passed to visibilitymap_set()
If visibilitymap_set() is called with flags containing a higher bit thanVISIBILITYMAP_ALL_FROZEN, the state of neighboring pages is affected. Whilethere was an assertion that *some* valid bits were set, it did not checkthat *only* valid bits were. Change that.Discussion:https://postgr.es/m/20230331043300.gux3s5wzrapqi4oe@awork3.anarazel.de
1 parent14f98e0 commita88a18b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/heap/visibilitymap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ visibilitymap_set(Relation rel, BlockNumber heapBlk, Buffer heapBuf,
259259

260260
Assert(InRecovery||XLogRecPtrIsInvalid(recptr));
261261
Assert(InRecovery||PageIsAllVisible((Page)BufferGetPage(heapBuf)));
262+
Assert((flags&VISIBILITYMAP_VALID_BITS)==flags);
262263

263264
/* Must never set all_frozen bit without also setting all_visible bit */
264-
Assert(flags&VISIBILITYMAP_VALID_BITS);
265265
Assert(flags!=VISIBILITYMAP_ALL_FROZEN);
266266

267267
/* Check that we have the right heap page pinned, if present */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp