var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Postgres DB size problem
I do have problem in Size of PostgreSQL DB.
The real size of the version DB is 6.05 GB(6195 MB)
After that I took the dump of the db in tar format,but the size of the db is 11GB.
mydb=# SELECT pg_size_pretty(pg_database_size('mydb'));
The actual size of DB and the tar size is differ by 5GB(appx).
[root@myserver]# du -hs mydb.out.tar
I thought of it is System problem and I tried it in different system.There also the same problem.
mydb1=# SELECT pg_size_pretty(pg_database_size('mydb'));
I used pg_dump command to dump the db.
[root@server]# du -hs mydb.out.tar
pg_dump mydb|gzip >mydb.out.tar.gz
[root@myserver]# du -hs mydb.out.tar.gz
[root@myserver]# gunzip du -hs mydb.out.tar.gz
Can anyone please explain why it is and Please instruct to solve the problem.
Last edited by tuxslonik; 08-01-11 at 08:44.
By default pg_dump creates a plain text file with SQL instructions to recreate your database. It will always be bigger than the database's binary data files.
If you don't need an SQL file, you can use pg_dump -Fc to create a binary file which is smaller but can only be imported via pg_restore.
This might be useful: Compare pg_dump and gzip compression | IAmA DBA AMA