Re: VACUUM (INTERRUPTIBLE)? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: VACUUM (INTERRUPTIBLE)?
Date
Msg-id 20200908203600.GA9179@alvherre.pgsql
Whole thread Raw
In response to VACUUM (INTERRUPTIBLE)?  (Andres Freund <andres@anarazel.de>)
Responses Re: VACUUM (INTERRUPTIBLE)?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2020-Sep-08, Andres Freund wrote:

> That made me wonder if it'd be worthwhile to add an option that'd make
> user invoked VACUUM be interruptible by conflicting lock requests, just
> like autovacuum is.

Yeah, I recall a request for this in the past, too.

> So how about adding an INTERRUPTIBLE option to VACUUM and ANALYZE?

+1 on adding it to VACUUM.  I'm not sure about ANALYZE ... most of the
time it is not as bad as VACUUM in terms of blocking other things, and
things get ugly if that ANALYZE is part of a transaction.  I think I'd
leave that out, since we don't have to cover all DDL that could take
ShareUpdateExclusive lock (CIC etc).  VACUUM is especially problematic,
ISTM, which is we would do it for that.

> Alternatively, if we do want to restrict it to VACUUM and ANALYZE, we'd
> have to re-introduce PROC_IN_ANALYZE ;). After 12 years of not being
> used and removed just weeks ago...

Hah :-)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: VACUUM (INTERRUPTIBLE)?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays