pgsql: Fix incorrect assertion bound in WaitForLSN()

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect assertion bound in WaitForLSN()
Date: 2025-12-04 08:55:52
Message-ID: E1vR57v-002jVa-22@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect assertion bound in WaitForLSN()

The assertion checking MyProcNumber used MaxBackends as the upper
bound, but the procInfos array is allocated with size
MaxBackends + NUM_AUXILIARY_PROCS. This inconsistency would cause
a false assertion failure if an auxiliary process calls WaitForLSN().

Author: Xuneng Zhou <xunengzhou(at)gmail(dot)com>

Branch
------
master

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

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

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-12-04 10:01:21 pgsql: headerscheck: Use LLVM_CPPFLAGS
Previous Message Andres Freund 2025-12-03 23:40:47 pgsql: bufmgr: Turn BUFFER_LOCK_* into an enum