pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: Table space grow big - PostgreSQL
Date: Wed, 5 May 2010 15:01:33 +0300
Message-ID: <201005051501.33619.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <4BE1140602000025000312C9@gw.wicourts.gov>
References: <4BE1140602000025000312C9@gw.wicourts.gov>

Στις Wednesday 05 May 2010 14:45:26 ο/η Kevin Grittner έγραψε:
> Khangelani Gama  wrote:
>  
> > /usr/local/pgsql/data/base directory shows the following where
> > 95186722/ takes a lot of space :
> 
> > 51G ./95186722
> 
> > Now the dump file of the very same database created by using
> > command : pg_dump -U user -O dbname > /tmp/filename is 2.8G big.
>  
> > The main question I have is: What makes the
> > /usr/local/pgsql/data/base/95186722/ grow 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?
>  
> The size of a dump is often somewhat smaller than the raw data, but
> this extreme difference suggests that your tables are bloated due to
> inadequate routine maintenance.  What version of PostgreSQL is this? 
> What is your vacuum policy?  Please show the contents of your
> postgresql.conf file with all comments stripped.
>  

It depends, in the case of indexes, one SQL CREATE INDEX statement could result to many megs of memory on disk,
while, on the other hand, binary content (a bytea holding e.g. image bitmaps) will have bigger size in the dump rather than
on disk's raw data, since it is compressed there.
In our case the dump is twice the size of the db on disk, but generally i think there cant be no universal rule of what is
larger than what.

> -Kevin
> 
> 



-- 
Achilleas Mantzios



view thread (14+ messages)  latest in thread

Message-ID: <201005051501.33619.achill@matrix.gatewaynet.com>
Permalink:  ../201005051501.33619.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/201005051501.33619.achill@matrix.gatewaynet.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-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: Table space grow big - PostgreSQL
  In-Reply-To: <201005051501.33619.achill@matrix.gatewaynet.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