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

Commitc36b636

Browse files
committed
Fix off-by-one in XLogRecordMaxSize check.
pg_logical_emit_message(false, '_', repeat('x', 1069547465)) failed withself-contradictory message "WAL record would be 1069547520 bytes (ofmaximum 1069547520 bytes)". There's no particular benefit from allowingor denying one byte in either direction; XLogRecordMaxSize could rise afew megabytes without trouble. Hence, this is just for cleanliness.Back-patch to v16, where this check first appeared.
1 parent638d42a commitc36b636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ XLogRecordAssemble(RmgrId rmid, uint8 info,
900900
* not emit records larger than the sizes advertised to be supported. This
901901
* cap is based on DecodeXLogRecordRequiredSpace().
902902
*/
903-
if (total_len >=XLogRecordMaxSize)
903+
if (total_len>XLogRecordMaxSize)
904904
ereport(ERROR,
905905
(errmsg_internal("oversized WAL record"),
906906
errdetail_internal("WAL record would be %llu bytes (of maximum %u bytes); rmid %u flags %u.",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp