Re: do only critical work during single-user vacuum? - Mailing list pgsql-hackers

From John Naylor
Subject Re: do only critical work during single-user vacuum?
Date
Msg-id CAFBsxsG-VDhXYa25uERfDGD4dO_AZ3d+Dv2NF+DJBADZiXejpw@mail.gmail.com
Whole thread Raw
In response to Re: do only critical work during single-user vacuum?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: do only critical work during single-user vacuum?
List pgsql-hackers
On Thu, Dec 9, 2021 at 5:13 PM Peter Geoghegan <pg@bowt.ie> wrote:
> Oh, I think I misunderstood. Your concern is for the case where the
> DBA runs a simple "VACUUM" in single-user mode; you want to skip over
> tables that don't really need to advance relfrozenxid, automatically.

Right.

> I can see an argument for something like that, but I think that it
> should be a variant of VACUUM. Or maybe it could be addressed with a
> better user interface;

On Thu, Dec 9, 2021 at 6:08 PM Andres Freund <andres@anarazel.de> wrote:
> What if the user tried to reclaim space by vacuuming (via truncation)? Or is
> working around some corruption or such?  I think this is too much magic.
>
> That said, having a VACUUM "selector" that selects the oldest tables could be
> quite useful. And address this usecase both for single-user and normal
> operation.

All good points.

[Peter again]
> single-user mode should prompt the user about
> what exact VACUUM command they ought to run to get things going.

The current message is particularly bad in its vagueness because some
users immediately reach for VACUUM FULL, which quite logically seems
like the most complete thing to do.

-- 
John Naylor
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Arne Roland
Date:
Subject: Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path
Next
From: Thomas Munro
Date:
Subject: Re: A test for replay of regression tests