Re: We should stop telling users to "vacuum that database in single-user mode"

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Hannu Krosing <hannuk(at)google(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: We should stop telling users to "vacuum that database in single-user mode"
Date: 2021-03-05 18:45:41
Message-ID: 20210305184541.GA4407@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Mar-02, David Rowley wrote:

> However, I wonder if it's worth going a few steps further to try and
> reduce the chances of that message being seen in the first place.
> Maybe it's worth considering ditching any (auto)vacuum cost limits for
> any table which is within X transaction from wrapping around.
> Likewise for "VACUUM;" when the database's datfrozenxid is getting
> dangerously high.

Yeah, I like this kind of approach, and I think one change we can do
that can have a very large effect is to disable index cleanup when in
emergency situations. That way, the XID limit is advanced as much as
possible with as little effort as possible; once the system is back in
normal conditions, indexes can be cleaned up at a leisurely pace.

--
Álvaro Herrera Valdivia, Chile
"El destino baraja y nosotros jugamos" (A. Schopenhauer)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-03-05 18:57:52 Re: CI/windows docker vs "am a service" autodetection on windows
Previous Message Fujii Masao 2021-03-05 17:36:55 Re: Nicer error when connecting to standby with hot_standby=off