Re: Obtaining the exact size of the database.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx   www.2ndQuadrant.us


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux