• Robert Haas's avatar
    Avoid having autovacuum workers wait for relation locks. · 32896c40
    Robert Haas authored
    Waiting for relation locks can lead to starvation - it pins down an
    autovacuum worker for as long as the lock is held.  But if we're doing
    an anti-wraparound vacuum, then we still wait; maintenance can no longer
    be put off.
    
    To assist with troubleshooting, if log_autovacuum_min_duration >= 0,
    we log whenever an autovacuum or autoanalyze is skipped for this reason.
    
    Per a gripe by Josh Berkus, and ensuing discussion.
    32896c40
autovacuum.c 82.1 KB