From 17dc17366093a84232170be1497a52049283fa75 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 11 Dec 2008 18:16:18 +0000 Subject: To reduce confusion over whether VACUUM FULL is needed for anti-wraparound vacuuming (it's not), say "database-wide VACUUM" instead of "full-database VACUUM" in the relevant hint messages. Also, document the permissions needed to do this. Per today's discussion. --- doc/src/sgml/maintenance.sgml | 8 ++++++-- doc/src/sgml/ref/vacuum.sgml | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'doc/src/sgml') diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 09c14782d86..f7925a0eee7 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -1,4 +1,4 @@ - + Routine Database Maintenance Tasks @@ -472,9 +472,13 @@ SELECT datname, age(datfrozenxid) FROM pg_database; WARNING: database "mydb" must be vacuumed within 177009986 transactions -HINT: To avoid a database shutdown, execute a full-database VACUUM in "mydb". +HINT: To avoid a database shutdown, execute a database-wide VACUUM in "mydb". + (A manual VACUUM should fix the problem, as suggested by the + hint; but note that the VACUUM must be performed by a + superuser, else it will fail to process system catalogs and thus not + be able to advance the database's datfrozenxid.) If these warnings are ignored, the system will shut down and refuse to execute any new transactions once there are fewer than 1 million transactions left diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index cfb748dd19f..cf32ac71b2f 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -1,5 +1,5 @@ @@ -40,8 +40,8 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ With no parameter, VACUUM processes every table in the - current database. With a parameter, VACUUM processes - only that table. + current database that the current user has permission to vacuum. + With a parameter, VACUUM processes only that table. @@ -146,6 +146,16 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ Notes + + To vacuum a table, one must ordinarily be the table's owner or a + superuser. However, database owners are allowed to + vacuum all tables in their databases, except shared catalogs. + (The restriction for shared catalogs means that a true database-wide + VACUUM can only be performed by a superuser.) + VACUUM will skip over any tables that the calling user + does not have permission to vacuum. + + VACUUM cannot be executed inside a transaction block. -- cgit v1.2.3