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

From Andres Freund
Subject Re: do only critical work during single-user vacuum?
Date
Msg-id 20211210015616.o242b4xchhpglfcy@alap3.anarazel.de
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?
Re: do only critical work during single-user vacuum?
List pgsql-hackers
Hi,

On 2021-12-09 16:34:53 -0800, Peter Geoghegan wrote:
> But even still, why not have some variant of single-user mode just for
> this task?

> Something that's easy to use when the DBA is rudely
> awakened at 4am -- something a little bit like a big red button that
> fixes the exact problem of XID exhaustion, in a reasonably targeted
> way? I don't think that this needs to involve the VACUUM command
> itself.

I think we should move *away* from single user mode, rather than the
opposite. It's a substantial code burden and it's hard to use.

I don't think single user mode is a good fit for this anyway - it's inherently
focussed on connecting to a single database. But wraparound issues often
involve more than one database (often just because of shared catalogs).


Also, requiring a restart will often exascerbate the problem - the cache will
be cold, there's no walwriter, etc, making the vacuum slower. Making vacuum
not consume an xid seems like a lot more promising - and quite doable. Then
there's no need to restart at all.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: do only critical work during single-user vacuum?
Next
From: Ashutosh Sharma
Date:
Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints