Re: VACUUM and locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Denise Bossarte" <mypostgreSQL(at)hotmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: VACUUM and locking
Date: 2002-10-28 18:39:49
Message-ID: 15713.1035830389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Denise Bossarte" <mypostgreSQL(at)hotmail(dot)com> writes:
> I have looked at the documentation on locking and VACUUM and have found
> conflicting reports.

> 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.

This is correct.

> 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.

This is an oversimplification, as it says "lock" where it means
AccessExclusiveLock.

> 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).

This document is pre-7.2.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message marnaudo@inwind.it 2002-10-28 19:57:02 psql history
Previous Message Marek Bartnikowski 2002-10-28 14:57:21 Re: Accumulated sums in SQL query