Fix possible crash reading pg_stat_activity. With the old code, a backend that read pg_stat_activity without ever having executed a parallel query might see a backend in the midst of executing one waiting on a DSA LWLock, resulting in a crash. The solution is for backends to register the tranche at startup time, not the first time a parallel query is executed.
Report by Andreas Seltenreich. Patch by me, reviewed by Thomas Munro. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/175ff6598e014b2fe84c06fa443161294fc2eed0 Modified Files -------------- src/backend/executor/execParallel.c | 1 - src/backend/storage/lmgr/lwlock.c | 2 ++ src/backend/utils/mmgr/dsa.c | 28 +++++++--------------------- src/include/utils/dsa.h | 5 ++--- 4 files changed, 11 insertions(+), 25 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
