X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 14924D1D16D for ; Mon, 2 Feb 2004 02:07:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 88181-02 for ; Sun, 1 Feb 2004 22:07:32 -0400 (AST) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 76636D1BB52 for ; Sun, 1 Feb 2004 22:07:27 -0400 (AST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id i1227NY24465; Mon, 2 Feb 2004 11:07:23 +0900 Message-ID: <004201c3e931$52120d90$7201a8c0@mst1x5r347kymb> From: "Iain" To: "Tom Lane" Cc: References: <000901c3e64e$9611c390$7201a8c0@mst1x5r347kymb> <23606.1075393949@sss.pgh.pa.us> Subject: Re: Routine maintenance - vacuum, analyse and autovacuum Date: Mon, 2 Feb 2004 11:07:33 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/7 X-Sequence-Number: 12181 > Just moving from 7.1 to 7.4 should help, since you can start using plain > vacuum (7.1's vacuum is equivalent to vacuum full IIRC). That old DB server has been running contnuously for 2 years they tell me. Apparently it is also growing despite nightly vacuums and a stable data set size (old data is purged dai.ly and monthly). Nightly delete/insert batches and vacuums are taking longer and longer too. I suspect the vacuum isn't doing what they think - possibly due to the FSM being at the default, and possibly due to ghost processes holding old record versions open. It has been stable nonetheless. Anyway, I'm sure we can do much better in 7.4. > > If I start a VACUUM FULL, is it ok to interrupt it part way through? I mean, > > is a partially completed vacuum full worth anything, and is there any danger > > in routinely killing it? > > It's crash-safe but you may leave your indexes bigger than before :-( OK, that's the kind of thing I wanted to know. Basically, partial runs of vacuum full are not likely to be of any benefit. So, unless you intend to let it run to completion, best to avoid it. Given that our system experiences quite heavy usage during the day, and has a nightly window for batch processing I'm wondering if the best way to go about this is to give auto vacuum a miss and just do a standard vacuum after the batch processes have completed. As long as the FSM is big enough to handle the amount of data changed in 1 day, it would be OK, right? Thanks for the input, (and Bruno too) Iain