Fix off-by-one in XLogRecordMaxSize check.
authorNoah Misch
Sat, 12 Aug 2023 21:37:05 +0000 (14:37 -0700)
committerNoah Misch
Sat, 12 Aug 2023 21:37:05 +0000 (14:37 -0700)
commitc36b636096a1aac4fd5d7c8c5d11ed2bb6349d0f
treee7825e4bcb8e5dd3f8e526882bdbd0443742600b
parent638d42a3c52081cf4882520f0622161bad69b40f
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