X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 336F0925881 for ; Thu, 22 May 2003 04:02:17 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 04675-01 for ; Thu, 22 May 2003 04:01:28 -0400 (EDT) Received: from freedom.norma.perm.ru (unknown [212.33.229.153]) by developer.postgresql.org (Postfix) with ESMTP id 86E0C925002 for ; Thu, 22 May 2003 00:40:01 -0400 (EDT) Received: from emz.norma.com ([192.168.3.169]) by freedom.norma.perm.ru (8.12.9/8.12.9) with ESMTP id h4M4du22028753 for ; Thu, 22 May 2003 10:39:57 +0600 (YEKST) (envelope-from emz@norma.perm.ru) Date: Thu, 22 May 2003 10:39:56 +0600 From: "Eugene M. Zheganin" X-Mailer: The Bat! (v1.62 Christmas Edition) Personal Reply-To: "Eugene M. Zheganin" Organization: Norma, Ltd. X-Priority: 3 (Normal) Message-ID: <54953117843.20030522103956@norma.perm.ru> To: pgsql-admin@postgresql.org Subject: Full vacuuming of BIG tables takes too long MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.53 X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/291 X-Sequence-Number: 8853 Hi, all. Just example. I have an table in ISP billing base, which every 2 months grows and contains up to 35,000,000 of records. That takes 13Gb of disk space. On that amount 'vacuum analyze' (every night) is inefficient, cause after it the table continues to grow (but not very fast). When trying to do 'vacuum full' it takes too long- I can wait only 5-6 hours (and that is not enough), cause it locks the table and the number of procecces, awaiting their inserts becomes too high. So it is much faster (40-50 mins) to dump the entire database, then drop it, recreate and resore it. I know that 'vacuum_mem = 65536' is not enough to do 'vacuum full' fast enough - but I wanna ask- if I dedcide to increase that number - will be 512 megs for example be better ? Is there any other init parameters that can helkp me ? Or speaking of such amount of data dump/recreate/restore will be the best way ? WBR, Eugene.