On Fri, Apr 11, 2014 at 10:28 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> VACUUM sometimes waits synchronously for a cleanup lock on a heap
> page. Sometimes for a long time. Without reporting it externally.
> Rather confusing ;).
>
> Since we only take cleanup locks around vacuum, how about we report at
> least in pgstat that we're waiting? At the moment, there's really no way
> to know if that's what's happening.
That seems like a pretty good idea to me. I think we've avoided doing
this for LWLocks for fear that there might be too much overhead, but
it's hard for me to imagine a workload where you're waiting for
cleanup locks often enough for the overhead to matter.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company