Fix race condition in XLogLogicalInfo and ProcSignal initialization. Previously, InitializeProcessXLogLogicalInfo() was called before ProcSignalInit(). This created a window where a process could miss a signal barrier if it was issued between these two calls. As a result, the process could fail to update its local XLogLogicalInfo cache, leading to an inconsistent logical decoding state.
This commit fixes this by moving InitializeProcessXLogLogicalInfo() after ProcSignalInit(). This ensures that the process is registered to participate in signal barriers before its state is initialized, preventing it from missing any state changes propagated during the startup sequence. Reviewed-by: Chao Li <[email protected]> Reviewed-by: Matthias van de Meent <[email protected]> Discussion: https://postgr.es/m/cad21aobzdesylsspm5e6ysn1r8qzp8u_brmnlvuap_s8qxs...@mail.gmail.com Discussion: https://postgr.es/m/cad21aobj+zkvgw_q8gjr4ybkccw_ume3ofq5+kt246fhuun...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b384cdb2745b56121426605d985210896555fc05 Modified Files -------------- src/backend/postmaster/auxprocess.c | 8 ++++++++ src/backend/utils/init/postinit.c | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-)
