]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix off-by-one in XLogRecordMaxSize check.
authorNoah Misch <noah@leadboat.com>
Sat, 12 Aug 2023 21:37:05 +0000 (14:37 -0700)
committerNoah Misch <noah@leadboat.com>
Sat, 12 Aug 2023 21:37:11 +0000 (14:37 -0700)
commit7823a298ba5c54a67f98c928f73500bc4089449f
tree75c94741a4efca4896167f0ab6eb1655bcfed158
parent7bed93a469bfa6954ce937b72ef1dc76fda7159e
Fix off-by-one in XLogRecordMaxSize check.

pg_logical_emit_message(false, '_', repeat('x', 1069547465)) failed with
self-contradictory message "WAL record would be 1069547520 bytes (of
maximum 1069547520 bytes)".  There's no particular benefit from allowing
or denying one byte in either direction; XLogRecordMaxSize could rise a
few megabytes without trouble.  Hence, this is just for cleanliness.
Back-patch to v16, where this check first appeared.
src/backend/access/transam/xloginsert.c