Postgres restore freaking SLOOOOOOW

Willie Trombone

Honorary Master
Joined
Jul 18, 2008
Messages
60,038
OK, I might be asking too much from an old dual CPU server, but I'm restoring a pg_dump which was dumped with the custom option (so compressed). I'm using the standard copy option (not insert) which is quicker. I've also tweaked my config to up work memory etc.

maintenance_work_mem=2GB
max_wal_size = 1Gb
checkpoint_timeout = 3600
checkpoint_completion_target = 0.9

The original pg_dump takes 30 minutes or less. pg_dump -F c -f mybackup.dump dbname

The restore has been running for 24 hours thus far :/ Pgrestore -F c -f mybackup.dump dbname

I think I need to move to the wal file archive method.
Granted the compressed backup is 600Mb+ (uncompressed is 7Tb)... but 24 hours plus???

I've backed up on postgres 9.3 and am restoring to a 9.5.5. box.

Anyone know any magic I should be trying?
 
Last edited:

Willie Trombone

Honorary Master
Joined
Jul 18, 2008
Messages
60,038
Urgh... must be something funky going on. I'm checking out the raw version of the dump with Glogg and it's now been running for 33 hours and it's done 20 million records of 175 million. There is no way this is normal!
 

gkm

Expert Member
Joined
May 10, 2005
Messages
1,519
Yes, at the moment this is like a book with the last page ripped out. Please let us know what happened in the end.
 
Top