pgsql: Update the documentation on recovering from (M)XID exhaustion. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Update the documentation on recovering from (M)XID exhaustion.
Date
Msg-id E1qsRHH-000sE0-8J@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Update the documentation on recovering from (M)XID exhaustion.

The old documentation encourages entering single-user mode for no
reason, which is a bad plan in most cases. Instead, discourage users
from doing that, and explain the limited cases in which it may be
desirable.

The old documentation claims that running VACUUM as anyone but the
superuser can't possibly work, which is not really true, because it
might be that some other user has enough permissions to VACUUM all
the tables that matter. Weaken the language just a bit.

The old documentation claims that you can't run any commands
when near XID exhaustion, which is false because you can still
run commands that don't require an XID, like a SELECT without a
locking clause.

The old documentation doesn't clearly explain that it's a good idea
to get rid of prepared transactons, long-running transactions, and
replication slots that are preventing (M)XID horizon advancement.
Spell out the steps to do that.

Also, discourage the use of VACUUM FULL and VACUUM FREEZE in
this type of scenario.

Back-patch to v14. Much of this is good advice on all supported
versions, but before 60f1f09ff44308667ef6c72fbafd68235e55ae27
the chances of VACUUM failing in multi-user mode were much higher.

Alexander Alekseev, John Naylor, Robert Haas, reviewed at various
times by Peter Geoghegan, Hannu Krosing, and Andres Freund.

Discussion: http://postgr.es/m/CA+TgmoYtsUDrzaHcmjFhLzTk1VEv29mO_u-MT+XWHrBJ_4nD8A@mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fdfb141a7467ef61396e6f697a45d0470285c657

Modified Files
--------------
doc/src/sgml/maintenance.sgml | 112 ++++++++++++++++++++++++++++++++++++------
1 file changed, 97 insertions(+), 15 deletions(-)


pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: List 006_login_trigger.pl test for meson
Next
From: Nathan Bossart
Date:
Subject: pgsql: Move extra code out of the Pre/PostRestoreCommand() section.