pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix off-by-one in XLogRecordMaxSize check.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix off-by-one in XLogRecordMaxSize check.
@ 2023-08-12 21:38  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Noah Misch @ 2023-08-12 21:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c36b636096a1aac4fd5d7c8c5d11ed2bb6349d0f

Modified Files
--------------
src/backend/access/transam/xloginsert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix off-by-one in XLogRecordMaxSize check.
@ 2023-08-12 21:38  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Noah Misch @ 2023-08-12 21:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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.

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7823a298ba5c54a67f98c928f73500bc4089449f

Modified Files
--------------
src/backend/access/transam/xloginsert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-08-12 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12 21:38 pgsql: Fix off-by-one in XLogRecordMaxSize check. Noah Misch <noah@leadboat.com>
2023-08-12 21:38 pgsql: Fix off-by-one in XLogRecordMaxSize check. Noah Misch <noah@leadboat.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox