From: Bossart, Nathan <bossartn@amazon.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: lyes.amd@gmail.com <lyes.amd@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14941: Vacuum crashes
Date: Fri, 1 Dec 2017 18:53:03 +0000
Message-ID: <1E4815BF-18D2-4184-989A-975728F59B88@amazon.com> (raw)
In-Reply-To: <cabd2b8a-ebbc-ad38-3ca2-113882afd12a@2ndquadrant.com>
References: <20171201160907.27110.74730@wrigleys.postgresql.org>
<cabd2b8a-ebbc-ad38-3ca2-113882afd12a@2ndquadrant.com>
On 12/1/17, 11:16 AM, "Tomas Vondra" <tomas.vondra@2ndquadrant.com> wrote:
>> The behavior I would like to see is that the void ignores this table and
>> moves to another instead of being blocked.
>>
>
> I believe autovacuum should not block waiting for a heavy-weight lock on
> a table since this commit that went into 9.1:
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=32896c40ca766146312b28a5a0eb3f66ca030...
>
> So I'm wondering what problem you're running into.
It sounds like Lyes is doing a periodic database-wide VACUUM that is
getting blocked on certain relations that are already locked (perhaps
because autovacuum is already working on it). IIUC, the ask is to provide
a way to skip vacuuming relations that cannot be immediately locked.
There is already an internal flag called VACOPT_NOWAIT that gives
autovacuum this ability in certain cases (introduced in the aforementioned
commit), and I recently brought up this potential use-case as
justification for a patch [0]. I'd be happy to submit a patch for
providing VACOPT_NOWAIT to users if others think it's something we should
do.
As a side note, this seems more like a feature request than a bug report,
so I'm adding pgsql-hackers@ here, too.
Nathan
[0] https://www.postgresql.org/message-id/875815E8-7A99-4488-AA07-F254C404E2CF%40amazon.com
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: bossartn@amazon.com, tomas.vondra@2ndquadrant.com, lyes.amd@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: BUG #14941: Vacuum crashes
In-Reply-To: <1E4815BF-18D2-4184-989A-975728F59B88@amazon.com>
References: <20171201160907.27110.74730@wrigleys.postgresql.org> <cabd2b8a-ebbc-ad38-3ca2-113882afd12a@2ndquadrant.com> <1E4815BF-18D2-4184-989A-975728F59B88@amazon.com>
* 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