From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Hannu Krosing <hannuk(at)google(dot)com> |
Cc: | 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-02 02:39:54 |
Message-ID: | 20210302023954.GB2288615@rfd.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 01, 2021 at 04:32:23PM +0100, Hannu Krosing wrote:
> It looks like we are unnecessarily instructing our usiers to vacuum their
> databases in single-user mode when just vacuuming would be enough.
> When I started looking at improving the situation I discovered, that there
> already is no need to run VACUUM in single user mode in any currently supported
> PostgreSQL version as you can run VACUUM perfectly well when the wraparound
> protection is active.
A comment in SetTransactionIdLimit() says, "VACUUM requires an XID if it
truncates at wal_level!=minimal." Hence, I think plain VACUUM will fail some
of the time; VACUUM (TRUNCATE false) should be reliable. In general, I like
your goal of replacing painful error message advice with less-painful advice.
At the same time, it's valuable for the advice to reliably get the user out of
the bad situation.
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2021-03-02 02:50:33 | Re: repeated decoding of prepared transactions |
Previous Message | Amit Langote | 2021-03-02 02:23:39 | Re: A reloption for partitioned tables - parallel_workers |