Re: BUG #14941: Vacuum crashes

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Lyes Ameddah <lyes(dot)amd(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14941: Vacuum crashes
Date: 2018-04-03 05:11:46
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

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

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2018-04-03 05:18:26 Re: Optimizing nested ConvertRowtypeExpr execution
Previous Message Amit Langote 2018-04-03 04:59:08 Re: [HACKERS] Add support for tuple routing to foreign partitions

Browse pgsql-bugs by date

  From Date Subject
Next Message 石勇虎 2018-04-03 09:34:57 autovacuum can not remove dead tuples
Previous Message Tom Lane 2018-04-03 03:39:20 Re: BUG #15141: Faulty ISO 8601 parsing