Re: database is bigger after dump/restore - why? (60 GB to 109 GB)

From: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: database is bigger after dump/restore - why? (60 GB to 109 GB)
Date: 2011-02-24 19:02:33
Message-ID: AANLkTin5wEmyLmhV0fnFmpPDWLMoBcSCnWve7xPEsu8r@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. Thanks for your replies.

How do I check the fillfactor on the table, please?

(http://www.postgresql.org/docs/8.4/static/sql-createtable.html tells me how
to set it, but I haven't found yet how to read it.)

Same CPU, same filesystem, same blocksize - identical systems. Same model
of server. We made them identical on purpose.

The way I check table size including TOAST and Indexes is:

SELECT relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size" from
pg_catalog.pg_statio_user_tables ORDER BY
pg_total_relation_size(relid) DESC;

My largest table is 50 GB in size; when I pg_dump it, and then
pg_restore it, it becomes 100 GB in size.

How do I pg_restore it so that it is 50 GB in size? Is it a setting
to pg_dump or to pg_restore?

Aleksey

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2011-02-24 19:10:29 Re: Adding a column with constraint
Previous Message David Johnston 2011-02-24 19:02:00 Re: Adding a column with constraint