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

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
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-27 10:52:57
Message-ID: AAFBFE3D-9448-40B6-A86F-C5EFD00BA652@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27 Feb 2011, at 9:49, Aleksey Tsalolikhin wrote:

> Database versions are identical:
> A: PostgreSQL 8.4.4 on x86_64-redhat-linux-gnu, compiled by GCC gcc
> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
> B: PostgreSQL 8.4.4 on x86_64-redhat-linux-gnu, compiled by GCC gcc
> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
>
>
> Character encoding of the source and target databases are identical:
> UTF8. (As reported by "psql -l".)

I noticed in your table definition that you seem to store timestamps in text-fields. Restoring those from text-fields shouldn't make any difference, but perhaps your locales are set up differently between the machines and cause some type of conversion to take place?
I know, that's a pretty wild guess.

> When I pg_dump the 50 GB table, I get a 40 GB file.
>
> When I pg_dump the 100 GB table, I get a 40 GB file.

I think the possible causes of the problem being with the database have been rather exhausted by now. Maybe the difference is in how the OS was set-up on each system. So, more questions:

What type of file-system are you using on each database (for the table in question)?
Are these filesystems configured identically, or does one perhaps have a different block-size than the other?
Is it set up as a raid array? If so, which raid-level?
Are your dumps going to that same file-system, or to a different one?

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.

!DSPAM:737,4d6a2d1b11731601256477!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2011-02-27 12:47:46 ERROR: invalid byte sequence for encoding "UTF8": 0xc35c
Previous Message Aleksey Tsalolikhin 2011-02-27 09:25:12 Re: pg_dump makes our system unusable - any way to pg_dump in the middle of the day? (postgres 8.4.4)