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

From Alex Hunsaker
Subject Re: database is bigger after dump/restore - why? (60 GB to 109 GB)
Date
Msg-id AANLkTimvo4=8qZKH37rnGc8xMz0S-4wUw=oCwbpxzBbH@mail.gmail.com
Whole thread Raw
In response to Re: database is bigger after dump/restore - why? (60 GB to 109 GB)  (Aleksey Tsalolikhin <atsaloli.tech@gmail.com>)
List pgsql-general
On Thu, Feb 24, 2011 at 14:11, Aleksey Tsalolikhin
<atsaloli.tech@gmail.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).

pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Index Ignored Due To Use Of View
Next
From: Adrian Klaver
Date:
Subject: Re: database is bigger after dump/restore - why? (60 GB to 109 GB)