Fix incorrect assertion bound in WaitForLSN()

Alexander Korotkov <akorotkov@postgresql.org>

Commit: d6ef8ee3ee29ffa404bcd920e02fb4b196e07b0d
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2025-12-04T08:38:12Z
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@gmail.com>

Files

PathChange+/−
src/backend/access/transam/xlogwait.c modified +1 −1