Re: database size much bigger than tablespaces on filesystem - Mailing list pgsql-admin

From Guillaume Lelarge
Subject Re: database size much bigger than tablespaces on filesystem
Date
Msg-id 1316001615.2110.13.camel@localhost.localdomain
Whole thread Raw
In response to database size much bigger than tablespaces on filesystem  (Rob Audenaerde <Rob.Audenaerde@Valuecare.nl>)
Responses Re: database size much bigger than tablespaces on filesystem  (Rob Audenaerde <Rob.Audenaerde@Valuecare.nl>)
List pgsql-admin
On Wed, 2011-09-14 at 04:03 -0700, Rob Audenaerde wrote:
> I have a Postgresql 8.3 instance with tablespaces totalling on about 74G. This is fine.
>
> But if I ask Postgresql how big my database is, I get a (unexpected) large answer: 595 GB.
>
> This seems very strange. Disk I/O tests on the system are in the 'normal' range, but queries are slower than they
usedto be. 
>
> Is this corruption of the database? Or are there ways to 'fix' this oddity?
>
> Btw:
>
> I check the tablespace size by the os:
>
> /usr/local/pgsql/data/tblspaces/du -c -h
> 74G total
>
> All tablespaces are there. I check this by the \db command in pgsql
>
> I check te database size like this:
>
> select pg_size_pretty(pg_database_size('database'))
> 595 GB

You should also check the space held in $PGDATA/base.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


pgsql-admin by date:

Previous
From: Gabriele Bartolini
Date:
Subject: Re: database size much bigger than tablespaces on filesystem
Next
From: Rob Audenaerde
Date:
Subject: Re: database size much bigger than tablespaces on filesystem