If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > PG database size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-12, 04:38
regcom@uniplan.it regcom@uniplan.it is offline
Registered User
 
Join Date: Jan 2012
Posts: 1
PG database size

I have a PostgreSQL database, I made a backup copy of it and then I have installed the copy on another machine.

I noticed that the database size calculated with the query:

Code:
select pg_database_size ('testdb'), pg_size_pretty (pg_database_size ('testdb'));
are significantly different on the two machines (the machine base is about twice the size).

I tried to make the VACUUM command but the dimensions have not changed.

What could be the cause of this difference?
There are other commands besides VACUUM to compact the database?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 01-04-12, 13:48
CarlosinFL CarlosinFL is offline
Registered User
 
Join Date: Oct 2010
Location: Orlando, FL
Posts: 184
Are there any visible differences you may have missed with the two databases? Are the encoding both UTF8 on the original and the backup? Perhaps you didn't notice but your pg_restore didn't properly generate all the table data from the backup for some reason. Can you delete the backup from the server, VACUUM the database, pg_dump, move the dump to the new server & then pg_restore? Maybe something went wrong with out discovery.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On