X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B9F305E46F3 for ; Sat, 28 Aug 2004 07:32:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43795-09 for ; Sat, 28 Aug 2004 10:32:11 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id DDB6E5E3631 for ; Sat, 28 Aug 2004 07:32:10 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i7SAWALq046539 for ; Sat, 28 Aug 2004 10:32:10 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i7SALm6w044582 for pgsql-admin@postgresql.org; Sat, 28 Aug 2004 10:21:48 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.admin Subject: Re: vacuum pg_attribute causes high load Date: Sat, 28 Aug 2004 12:21:33 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 42 Message-ID: <41305CAD.3000501@bigfoot.com> References: <20040828034735.11121.qmail@web52802.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr To: kris pal User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en In-Reply-To: <20040828034735.11121.qmail@web52802.mail.yahoo.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/294 X-Sequence-Number: 14689 kris pal wrote: > > Christopher, > > Thanks for your detailed response. Now I get the idea why vacuum is > causing so much load. We should have vacuumed the database more often > but didn't do it as we are more used to managing Oracle databases. This > is the first Postgres instance that I am managing. > > The datafile for production database ("bbs") is abt 6GB, though the > actual data is very small, abt 20MB. I used the dump (from pg_dump of > "bbs") of the production database to import into a "test_database" - > its datafile size was < 20MB. > > So instead of going through all these, am planning to have down time of > 15 mins and do the following: > > 1)"pg_dump bmgs" > 2)"drop the database bmgs" > ** (this should essentially free up all the space occupied by > pg_attribute and its indexes - right ?? ) > 3)"recreate database bmgs" > and > 4)import the dump from step 1) into bmgs created in step 3) > > > Do you think there will be issues with this approach? The system catalog > will be built from scratch, and there won't be any data loss right. That > way I can reclaim the space and then run Vacuum more often. Before to do it be sure that your pg_dump is non affected by not well ordered objects, if yes you have to reorder the order creation ( manually ) in the dump, some times happen. Regards Gaetano Mendola