From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Lyes Ameddah <lyes.amd@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.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: Tue, 3 Apr 2018 14:11:46 +0900
Message-ID: <20180403051146.GA12320@paquier.xyz> (raw)
In-Reply-To: <20180331001946.uie7elezusxes7qw@alap3.anarazel.de>
References: <4B232BD7-A97D-4461-81E6-28A49764B60E@amazon.com>
<20180110025331.GE336@paquier.xyz>
<CBEE19BB-6C70-424C-95E5-F8ABC7AA2185@amazon.com>
<20180110231442.GA22983@paquier.xyz>
<20180304001252.5sxn3glccnu5qxjm@alap3.anarazel.de>
<7327B413-1A57-477F-A6A0-6FD80CB5482D@amazon.com>
<20180307050345.GA3095@paquier.xyz>
<3834EFB8-2A90-41C7-A7C8-8B956150479D@amazon.com>
<4D1115BF-ED38-44E2-B799-C7F9E421A3B8@amazon.com>
<20180331001946.uie7elezusxes7qw@alap3.anarazel.de>
On Fri, Mar 30, 2018 at 05:19:46PM -0700, Andres Freund wrote:
> On 2018-03-30 18:39:01 +0000, Bossart, Nathan wrote:
>> I think the most straightforward approach for fixing this is to add
>> skip-locked functionality in find_all_inheritors(),
>> find_inheritance_children(), and vac_open_indexes(), but I am curious
>> what others think.
For vac_open_indexes() it may make the most sense to introduce a new
try_open_index which wraps on top of try_relation_open with checks on
the opened relation's relkind.
> I'm actually wondering if we shouldn't just ignore this problem. While
> the other cases VACUUM (SKIP LOCKED) are intended to solve seem common,
> these seem less so. But it'd be a bit weird, too..
Wouldn't that cause deadlocks if one session has VACUUM (SKIP_LOCKED)
and another session running vacuum or autovacuum if simply ignored?
That looks dangerous to me than simply skipping a lock that cannot be
taken.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, andres@anarazel.de, bossartn@amazon.com, sawada.mshk@gmail.com, robertmhaas@gmail.com, lyes.amd@gmail.com, tomas.vondra@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: BUG #14941: Vacuum crashes
In-Reply-To: <20180403051146.GA12320@paquier.xyz>
References: <4B232BD7-A97D-4461-81E6-28A49764B60E@amazon.com> <20180110025331.GE336@paquier.xyz> <CBEE19BB-6C70-424C-95E5-F8ABC7AA2185@amazon.com> <20180110231442.GA22983@paquier.xyz> <20180304001252.5sxn3glccnu5qxjm@alap3.anarazel.de> <7327B413-1A57-477F-A6A0-6FD80CB5482D@amazon.com> <20180307050345.GA3095@paquier.xyz> <3834EFB8-2A90-41C7-A7C8-8B956150479D@amazon.com> <4D1115BF-ED38-44E2-B799-C7F9E421A3B8@amazon.com> <20180331001946.uie7elezusxes7qw@alap3.anarazel.de> <20180403051146.GA12320@paquier.xyz>
* 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