To enable diagnosis of systems that are not processing ProcSignalBarrier requests promptly, add a LOG message every 5 seconds if we seem to be wedged. Although you could already see this state as a wait event in pg_stat_activity, the log message also shows the PID of the process that is preventing progress.
Also add DEBUG1 logging around the whole wait loop.
0d3431497d Add logging for excessive ProcSignalBarrier waits.
src/backend/storage/ipc/procsignal.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)