Fix incorrect assertion bound in WaitForLSN()
authorAlexander Korotkov <akorotkov@postgresql.org>
Thu, 4 Dec 2025 08:38:12 +0000 (10:38 +0200)
committerAlexander Korotkov <akorotkov@postgresql.org>
Thu, 4 Dec 2025 08:38:12 +0000 (10:38 +0200)
commitd6ef8ee3ee29ffa404bcd920e02fb4b196e07b0d
treef232804b95f47a406d033f323175a779dc6e3944
parent6c5c393b74031351721f8a44e55bfaf6f249eefb
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>
src/backend/access/transam/xlogwait.c