Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 59CFE6337F9 for ; Wed, 5 May 2010 10:54:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87360-09 for ; Wed, 5 May 2010 13:54:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mail.postgresql.org (Postfix) with ESMTP id 0F86463364F for ; Wed, 5 May 2010 10:54:38 -0300 (ADT) Received: by bwz28 with SMTP id 28so2762423bwz.34 for ; Wed, 05 May 2010 06:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Pzi1Uo4vvkekuaJsA1LEl6YP9Wv4dzZ8E6g7HuVi6Tk=; b=Rj5s2rh+hrNlDBJWIodhYvWgslphaj4c6Y7osryoiuwpDMq4/0cG67fihSOJfl/pe1 yKigW6GnWhV/IogBhuyJiwfpYWOOUTrsZvy75qDxO8X0/W20tKdO7tb7/oFikGFMdt15 qTeMbvl/16mz5bJhncYJ7da5KZV6FRDe6jSRk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=pHXO1qVoyuO/nHXE7sQ8AL1mAKrYd6yaqpi5RSfl2OIRNYxKI60rdTElhVTYoUHAgW dLjKUJtN4pMuuB5aDOoEQFqjvRJIXjjX3O1/Uovs02SkvLOKnEef6C89yaEje7FBRu/3 qYdC8LUX/TeMzhqDdfwpVeXBDtRGF9dTkoKJs= Received: by 10.204.126.88 with SMTP id b24mr1882238bks.79.1273067676382; Wed, 05 May 2010 06:54:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.54.198 with HTTP; Wed, 5 May 2010 06:54:16 -0700 (PDT) In-Reply-To: References: <20100505114210.GD16616@miranda> From: Ian Lea Date: Wed, 5 May 2010 14:54:16 +0100 Message-ID: Subject: Re: Table space grow big - PostgreSQL To: Khangelani Gama Cc: "pgsql-admin@postgresql.org" 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=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/58 X-Sequence-Number: 34531 In your original email I think you showed a directory that held something like 50Gb of files with a listing of that directory that added up to something much smaller. If that is right - what else is in that directory? Does your monthly vacuum script work? -- Ian. On Wed, May 5, 2010 at 2:42 PM, Khangelani Gama wrote: > Many Thanks for all the replies. > > > The conversion project to version 8 is still in progress, hence we are st= ill experiencing problems on a version that's not supported. That's an hone= st answer I can give. The thing is it's frustrating to not to have a source= of support as we still have to give support on this version 7.3.4 > > > There is a script that runs once a month which reindex, vacuum full verbo= rse and vacuum analyze : > > Small picture inside the script: > > =A0 =A0 =A0 =A0echo "VACUUMING TABLE ${table} " >>$log 2>>$log > =A0 =A0 =A0 =A0/usr/local/pgsql/bin/psql -U $dbuser -h localhost ${db} -t= c "REINDEX TABLE ${table}" >>$log 2>>$log > =A0 =A0 =A0 =A0/usr/local/pgsql/bin/psql -U $dbuser -h localhost ${db} -t= c "VACUUM FULL VERBOSE ${table}" >>$log =A02>>$log > =A0 =A0 =A0 =A0/usr/local/pgsql/bin/psql -U $dbuser -h localhost ${db} -t= c "VACUUM ANALYZE ${table}" >>$log =A02>>$log > > > Dumping and restoring the database doesn't decrease the space > > > > There is nothing set in the postgresql.conf file that has to do with vacu= um analyze. > > If we could have a way to reduce the space in /usr/local/pgsql/data/base/= 95186722 directory we would be sorted > > > > > > > > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgres= ql.org] On Behalf Of Brett Parker > Sent: Wednesday, May 05, 2010 1:42 PM > To: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Table space grow big - PostgreSQL > > On 05 May 13:36, Khangelani Gama wrote: >> Hi all >> >> >> Please assist on this scenario, I am a junior DBA, perhaps the >> question I have is too simple please bear with me. >> >> I have a server with one PostgreSQL database and the data reside in >> /usr/local/pgsql/data/ running on Redhat 9 O/S. > > > >> The main question I have is: What makes the >> /usr/local/pgsql/data/base/95186722/ =A0grow so big while the actual >> data with its schema is only 2.8G and that is there a way to reduce >> the table space sizes or anything related to that? > > OK - what version of postgres would be a good starting question... > > But, at a guess, I'd say you have a fair amount of table churn, and that > you're probably due running a VACUUM FULL over the database that is > using the most space, it may fail, but if it does it should tell you > what bit of config you'll need to change to make it work. > > The other possible usage of lots of space is indexes on the database > tables, these are not included in the dump, and so the size of the dump > doesn't accurately reflect the size of the on disc data. > > Hope that gives you somewhere to start from. > > Thanks, > -- > Brett Parker > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > > The contents of and attachments to this e-mail are intended for the addre= ssee only, and may contain the confidential information of UCS Group and/or= its subsidiaries. =A0Any review, use or dissemination thereof by anyone ot= her than the intended addressee is prohibited. =A0If you are not the intend= ed addressee please notify the writer immediately and destroy the e-mail. = =A0UCS Group Limited and its subsidiaries distance themselves from and acce= pt no liability for unauthorised use of their e-mail facilities or e-mails = sent other than strictly for business purposes. > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin >