Received: from maia.hub.org (unknown [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9E0611336FA7 for ; Mon, 25 Oct 2010 12:03:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 14681-05 for ; Mon, 25 Oct 2010 15:03:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9DA521336473 for ; Mon, 25 Oct 2010 12:03:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o9PF37hf008124; Mon, 25 Oct 2010 11:03:07 -0400 (EDT) To: Jochen Erwied cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5722: vacuum full does not update last_vacuum statistics In-reply-to: <1956079949.20101025164839@erwied.eu> References: <201010251242.o9PCgO10001534@wwwmaster.postgresql.org> <6540.1288015959@sss.pgh.pa.us> <1956079949.20101025164839@erwied.eu> Comments: In-reply-to Jochen Erwied message dated "Mon, 25 Oct 2010 16:48:39 +0200" Date: Mon, 25 Oct 2010 11:03:07 -0400 Message-ID: <8123.1288018987@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/202 X-Sequence-Number: 28492 Jochen Erwied writes: > Monday, October 25, 2010, 4:12:39 PM you wrote: >> "Jochen Erwied" writes: >>> VACUUM FULL does not update statistics so display of pg_stat_user_tables is >>> wrong. A normal VACUUM updates the relevant information. >> Hmm. This is a definitional issue: what do we really mean by last_vacuum? >> I'm inclined to think that the current behavior is reasonable. VACUUM >> FULL is (still) not intended as a routine maintenance operation, and >> the point of that column is to track routine maintenance operations. > Well, when reading > http://www.postgresql.org/docs/current/static/monitoring-stats.html > then last_vacuum contains the last time of a user-initiated vacuum. There's > no distinction made what kind of vacuum was made. And IMHO even if VACUUM > FULL isn't meant for routine vacuuming, the state should be changed. Perhaps. The new implementation of VACUUM FULL is really more like a CLUSTER, or one of the rewriting variants of ALTER TABLE. Should all of those operations result in an update of last_vacuum? From an implementation standpoint it's difficult to say that only some of them should, because all of them result in a table that has no immediate need for vacuuming. The only argument I can see for having only VACUUM FULL update the timestamp is that it's called VACUUM and the others aren't. Which is an argument, but not a terribly impressive one IMO. > Of course the easiest way to fix this bug (or better flaw) is to change the > documentation :-) Yeah, that part of the docs will require editing no matter what we do. I'm just trying to get some clarity on what the most reasonable behavior is. regards, tom lane