pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix off-by-one in XLogRecordMaxSize check.
Date: Sat, 12 Aug 2023 21:38:29 +0000
Message-ID: <E1qUwJY-001krt-IW@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1qUwJY-001krt-IW@gemulon.postgresql.org>
Permalink:  ../E1qUwJY-001krt-IW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qUwJY-001krt-IW@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix off-by-one in XLogRecordMaxSize check.
  In-Reply-To: <E1qUwJY-001krt-IW@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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