pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: venu madhav <venutaurus539@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Obtaining the exact size of the database.
Date: Sun, 20 Jun 2010 16:04:09 -0400
Message-ID: <4C1E7439.4000800@2ndquadrant.com> (raw)
In-Reply-To: <AANLkTimgNriCuf2QVmxUbqqiZO73BZ1VFMmaxq20RSKi@mail.gmail.com>
References: <AANLkTimgNriCuf2QVmxUbqqiZO73BZ1VFMmaxq20RSKi@mail.gmail.com>

venu madhav wrote:
> The problem here is even though some records are cleared, it still 
> shows the original DB Size. Is there any way to find out the actual DB 
> Size or it would be more useful, if I can get the size of each table.

One of the queries at http://wiki.postgresql.org/wiki/Disk_Usage should 
give you the breakdown per table.  Regular VACUUM doesn't ever shrink 
the database from the operating system perspective unless you hit a very 
unusual situation (all of the free space is at the end).  There is no 
way to do that without system downtime of sorts in the form a 
potentially long database lock, such as VACUUM FULL (the main option on 
8.1, the alternative of using CLUSTER isn't a good idea until 8.3).  The 
best you can do is making sure you VACUUM often enough that space is 
regularly reused.

It's hard to run a 24x7 environment on 8.1.  Much easier on 8.4, where 
the major things that regularly left people with quite bad VACUUM 
cleanup situations are all less likely to occur than on any previous 
version.

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us




view thread (5+ messages)  latest in thread

Message-ID: <4C1E7439.4000800@2ndquadrant.com>
Permalink:  ../4C1E7439.4000800@2ndquadrant.com/
Also on:    postgresql.org/message-id/4C1E7439.4000800@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: greg@2ndquadrant.com, venutaurus539@gmail.com
  Subject: Re: Obtaining the exact size of the database.
  In-Reply-To: <4C1E7439.4000800@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox