From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Hung Vacuum in 8.3
Date: Wed, 23 Feb 2011 10:20:13 +1300
Message-ID: <4D64288D.4080402@catalyst.net.nz> (raw)
In-Reply-To: <AANLkTik6cN+Ku86LU-p1yGAOfTDn_e=vuy6d=D7cjaoA@mail.gmail.com>
References: <4D6330E9.6030809@catalyst.net.nz>
<4D635C1C.7040304@enterprisedb.com>
<4D636247.600@catalyst.net.nz>
<AANLkTiko6Sv5Z3bnOdxmTXixNcXmK9qbSq7fWyxAp9Gk@mail.gmail.com>
<AANLkTik6cN+Ku86LU-p1yGAOfTDn_e=vuy6d=D7cjaoA@mail.gmail.com>
On 23/02/11 03:27, Robert Haas wrote:
> On Tue, Feb 22, 2011 at 6:26 AM, Greg Stark<gsstark@mit.edu> wrote:
>> Actually it's not waiting for the LockBuffer LWLock. it's waiting
>> until your query unpins the buffer it wants. Vacuum tries to get an
>> exclusive lock on the buffer, if it gets it then it checks if anyone
>> is using that buffer. If someone is then it unlocks the buffer and
>> waits until nobody has it pinned.
> How bad it would be if we made LockBufferForCleanup() not wait? If we
> can't obtain the buffer cleanup lock immediately, we just skip that
> page and continue on. That would prevent us from updating
> relfrozenxid, I guess, but we already can't do that if there are any
> bits set in the visibility map. It could also leave some bloat in
> the table, but probably not much (he says hopefully).
>
Seems like a good suggestion, and may leave less bloat than having the
vacuum hung for potentially quite some time.
Mark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mark.kirkwood@catalyst.net.nz, robertmhaas@gmail.com, gsstark@mit.edu, heikki.linnakangas@enterprisedb.com
Subject: Re: Hung Vacuum in 8.3
In-Reply-To: <4D64288D.4080402@catalyst.net.nz>
References: <4D6330E9.6030809@catalyst.net.nz> <4D635C1C.7040304@enterprisedb.com> <4D636247.600@catalyst.net.nz> <AANLkTiko6Sv5Z3bnOdxmTXixNcXmK9qbSq7fWyxAp9Gk@mail.gmail.com> <AANLkTik6cN+Ku86LU-p1yGAOfTDn_e=vuy6d=D7cjaoA@mail.gmail.com> <4D64288D.4080402@catalyst.net.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox