• Robert Haas's avatar
    Fix possible crash reading pg_stat_activity. · 175ff659
    Robert Haas authored
    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.
    175ff659
lwlock.c 49.9 KB