Re: Signaling of waiting for a cleanup lock?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Signaling of waiting for a cleanup lock?
Date: 2014-04-14 14:45:45
Message-ID: CA+U5nM+WxypGvdDLJ_YMu94ne81vgh5YEB8i441Pn2_mDowb-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13 April 2014 16:44, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2014-04-12 17:40:34 -0400, Robert Haas wrote:
>> On Fri, Apr 11, 2014 at 10:28 AM, Andres Freund <andres(at)2ndquadrant(dot)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.
>
> What I am not sure about is how... It's trivial to set
> pg_stat_activity.waiting = true, but without a corresponding description
> what the backend is waiting for it's not exactly obvious what's
> happening. I think that's better than nothing, but maybe somebody has a
> glorious better idea.

pg_stat_activity.waiting = true

can be done in 9.4 easily enough. Any objections to doing this?

Easy to set the ps message also

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-04-14 14:50:05 Re: Signaling of waiting for a cleanup lock?
Previous Message Tom Lane 2014-04-14 14:40:49 Re: HEAD seems to generate larger WAL regarding GIN index