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

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
Cc: 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 21:53:21
Message-ID: AANLkTimvo4=8qZKH37rnGc8xMz0S-4wUw=oCwbpxzBbH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 24, 2011 at 14:11, Aleksey Tsalolikhin
<atsaloli(dot)tech(at)gmail(dot)com> wrote:

>> are you truncating the table before restoring, or is this a restore into a
>> new database, or what?
>
> I've tried both.  Slony truncates the table before copying it over, and I've
> tryind pg_restore'ing it into a new database.  In both cases, the 50 GB
> table arrives as a 100 GB table.

Are they both the same version of pg? I'm wondering if the 50GB
version is running 8.3 and the slave something >=8.4, IIRC I had a
table that grew quite a bit because of some TOAST changes in 8.4. If
so, I'd first try making the slave and master versions of pg match,
which is good practice anyhow.

If none of the above ring any bells, maybe some bloat is creeping in.
Check_postgres (http://bucardo.org/wiki/Check_postgres) has some nice
metrics for that. (I suppose you could also try CLUSTER and see ff
that makes a size difference).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-02-24 21:59:00 Re: database is bigger after dump/restore - why? (60 GB to 109 GB)
Previous Message David Johnston 2011-02-24 21:29:01 Index Ignored Due To Use Of View