Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5E1HOE91113 for ; Wed, 13 Jun 2001 21:17:25 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f5E1HB015663; Wed, 13 Jun 2001 21:17:11 -0400 (EDT) To: "David Wall" cc: pgsql-general@postgresql.org Subject: Re: Vacuum analyze in 7.1.1 In-reply-to: <006501c0f45b$eca1c580$5a2b7ad8@expertrade.com> References: <00c401c0f43b$a5423000$5a2b7ad8@expertrade.com> <3101.992468005@sss.pgh.pa.us> <006501c0f45b$eca1c580$5a2b7ad8@expertrade.com> Comments: In-reply-to "David Wall" message dated "Wed, 13 Jun 2001 15:55:21 -0700" Date: Wed, 13 Jun 2001 21:17:11 -0400 Message-ID: <15660.992481431@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/508 X-Sequence-Number: 10998 "David Wall" writes: > The docs say that VACUUM: > "VACUUM opens every table in the database, cleans out records from rolled > back transactions, and updates statistics in the system catalogs. The > statistics maintained include the number of tuples and number of pages > stored in all tables." > Isn't also true that VACUUM cleans out deleted and updated rows for > committed transactions? Okay. As far as the VACUUM reference page goes, that's already changed for 7.2 --- you might like to look at http://www.ca.postgresql.org/devel-corner/docs/postgres/sql-vacuum.html The current description there is: VACUUM reclaims storage occupied by deleted tuples. In normal Postgres operation, tuples that are DELETEd or obsoleted by UPDATE are not physically removed from their table; they remain present until a VACUUM is done. Therefore it's necessary to do VACUUM periodically, especially on frequently-updated tables. With no parameter, VACUUM processes every table in the current database. With a parameter, VACUUM processes only that table. VACUUM ANALYZE performs a VACUUM and then an ANALYZE for each selected table. This is a handy combination form for routine maintenance scripts. See ANALYZE for more details about its processing. (The last para refers to the fact that ANALYZE is also available as a separate command in 7.2; that wasn't true before.) I was mainly wondering if you'd come across any misstatements other than on the command reference page... > And for those who use large objects, I understand that vacuum now > cleans those up when they are deleted as well (no need for vacuumlo > anymore). Mmm, not really. As of 7.1, VACUUM will clean up space occupied in pg_largeobject by deleted or modified LOs. However, it doesn't try to detect whether an LO still has any references or not, so you still need vacuumlo if your application is not careful to issue lo_unlink at all the right times. Not sure where this should be documented. The docs on large objects are pretty bad anyway :-( regards, tom lane