Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B13A5632EB6; Sat, 27 Mar 2010 10:47:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 34842-02; Sat, 27 Mar 2010 13:47:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound-smtp.firstam.com (outbound-smtp5.firstam.com [69.87.54.10]) by mail.postgresql.org (Postfix) with ESMTP id E0DEE63305E; Sat, 27 Mar 2010 10:47:41 -0300 (ADT) Received: from unknown (HELO CITGSNA01VXCH22.ana.firstamdata.com) ([172.17.88.79]) by outbound-smtp.firstam.com with ESMTP; 27 Mar 2010 06:47:41 -0700 Received: from CITGSNA01SXCH02.ana.firstamdata.com ([172.17.88.30]) by CITGSNA01VXCH22.ana.firstamdata.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 27 Mar 2010 06:47:40 -0700 Received: from 172.17.88.26 ([172.17.88.26]) by CITGSNA01SXCH02.ana.firstamdata.com ([172.17.88.37]) with Microsoft Exchange Server HTTP-DAV ; Sat, 27 Mar 2010 13:47:40 +0000 MIME-Version: 1.0 Message-ID: <106c901cacdb4$1156ad15$1a1ca8c0@ana.firstamdata.com> Content-class: X-MimeOLE: Produced By Microsoft Exchange V6.5 Thread-Topic: [ADMIN] Database size growing over time and leads to performance impact Thread-Index: AcrNrV2lxwrWTqp4Se+uazWUBBQ1iQABrOyF From: "Tomeh, Husam" Subject: Re: Database size growing over time and leads to performance impact Date: Sat, 27 Mar 2010 06:47:53 -0700 Importance: normal X-Priority: 3 To: , X-OriginalArrivalTime: 27 Mar 2010 13:47:40.0930 (UTC) FILETIME=[11C34E20:01CACDB4] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.196 tagged_above=-10 required=5 tests=AWL=0.403, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/207 X-Sequence-Number: 34006 You may want to consider performing more frequent vacuums a week or really = considering leveraging autovacuum if it makes sense to your transactions vo= lume. =20 Regards, Husam=20 -----Original Message----- From: Gnanakumar Sent: Saturday, March 27, 2010 6:06 AM To: pgsql-admin@postgresql.org ; pgsql-performa= nce@postgresql.org Subject: [ADMIN] Database size growing over time and leads to performance i= mpact Hi, =20 We're using PostgreSQL 8.2. Recently, in our production database, there was a severe performance impact.. Even though, we're regularly doing both: 1. VACUUM FULL ANALYZE once in a week during low-usage time and 2. ANALYZE everyday at low-usage time =20 Also, we noticed that the physical database size has grown upto 30 GB. But, if I dump the database in the form of SQL and import it locally in my machine, it was only 3.2 GB. Then while searching in Google to optimize database size, I found the following useful link: =20 http://www.linuxinsight.com/optimize_postgresql_database_size.html =20 It says that even vacuumdb or reindexdb doesn't really compact database size, only dump/restore does because of MVCC architecture feature in PostgreSQL and this has been proven here. =20 So, finally we decided to took our production database offline and performed dump/restore. After this, the physical database size has also reduced from 30 GB to 3.5 GB and the performance was also very good than it was before. =20 Physical database size was found using the following command: du -sh /usr/local/pgsql/data/base/ =20 I also cross-checked this size using "pg_size_pretty(pg_database_size(datname))". =20 Questions 1. Is there any version/update of PostgreSQL addressing this issue? 2. How in real time, this issues are handled by other PostgreSQL users without taking to downtime? 3. Any ideas or links whether this is addressed in upcoming PostgreSQL version 9.0 release? =20 ***************************************************************************= ***************=20 This message may contain confidential or proprietary information intended o= nly for the use of the=20 addressee(s) named above or may contain information that is legally privile= ged. If you are=20 not the intended addressee, or the person responsible for delivering it to = the intended addressee,=20 you are hereby notified that reading, disseminating, distributing or copyin= g this message is strictly=20 prohibited. If you have received this message by mistake, please immediatel= y notify us by =20 replying to the message and delete the original message and any copies imme= diately thereafter.=20 Thank you.=20 ***************************************************************************= ***************=20 FACLD