2

I've got two PostgreSQL databases that have been created using the same sql file. One of them is 2GB larger. Can someone help me figure out why? I'm sure the databases have the same row counts, tables, indexes, etc.. The databases are on different servers, there are small differences in the postgresql.conf and the PostgreSQL version. Would something there change size on disk?

1
  • what db versions are you running? Commented Jan 14, 2009 at 21:53

3 Answers 3

2

You mentioned they are on two different servers and two different versions. Is it possible you have a 32-bit OS and a 64-bit OS differences, or major version changes (because we don't know all the changes that the Postgresql team has made to the underlying data structures on disk). You may find it has something to do with internal formats of indexes that are optimized for a particular machine's OS/CPU features, etc.

My comments are purely speculation, I have no data to back up my 'claims'.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, one is 32 bit and one is 64 bit. The version differences are minor (8.1.3 and 8.1.9). I suppose either one of these could be possible, but I can't find any info to back it up either. Thanks though...
1

In PostgreSQL, any single table, index or log is stored as a separate file. A complex database can have thousands of files. Maybe the difference is due to different block size ore cluster size in the server filesystems.

Comments

0

Try using the VACUUM command on PostgreSQL to free formerly used space.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.