VACUUM and locking

From: "Denise Bossarte" <mypostgreSQL(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: VACUUM and locking
Date: 2002-10-25 14:36:07
Message-ID: apbkr3$a8f$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am trying to automate VACUUMing several databases and am confused on how
client connections to the database might affect the VACUUM.

I have looked at the documentation on locking and VACUUM and have found
conflicting reports.

The 7.2.1 Documentation
http://www.postgresql.org/idocs/index.php?locking-tables.html states that
VACUUM (without FULL) acquires a ShareUpdateExclusiveLock and VACUUM with
FULL acquires an AcessExclusiveLock.

However, the 7.2.1 Appendix A. Release Notes state "Vacuuming no longer
locks tables, thus allowing normal user access during the vacuum. A new
VACUUM FULL command does old-style vacuum by locking the table and shrinking
the on-disk copy of the table." Additionally, the "Transaction Processing
in Postgres" pdf http://developer.postgresql.org/pdf/transactions.pdf only
shows AcessExclusiveLock acquird by VACUUM (full? - not stated) (p. 18).

So which, if any, locks does VACUUM acquire? How do client connections to
the database affect the VACUUM? What is the best way to automate VACUUM?

Thanks for your help,

Denise

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tony Grant 2002-10-25 14:36:14 Re: Foreign character struggles
Previous Message Tim Perdue 2002-10-25 13:33:00 Foreign character struggles