Thread: 7.3.2 pg_restore very slow

7.3.2 pg_restore very slow

From
Saranya Sivakumar
Date:
Hi All,
 
I am trying to back up a full copy of one of our databases (14G) and restore it on another server. Both databases run 7.3.2 version. Though the restore completed successfully, it took 9 hours for the process to complete. The destination server runs Fedora Core 3 with 512 MB RAM and has 1 processor.  I have also deferred referential intergrity checks during the restore. I tried to tune some parameters in the config file, but it still takes 9 hours.
 
I have tried this same procedure to restore a full copy, but using 8.1(pg_dump and pg_restore) on a different server and that process took only 2 hours for the same database. But we are unable to migrate to 8.1 at this point and stuck with 7.3.2.
 
I use a script to dump/restore. I can send the same if that information is needed.
 
Please give me some pointers on what else I should be looking at to reduce the restore time using 7.3.2 version.
 
Thanks,
Sincerely,
Saranya Sivakumar
 
 
 
 
 


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

Re: [PERFORM] 7.3.2 pg_restore very slow

From
Richard Huxton
Date:
Saranya Sivakumar wrote:
> Hi All,
>
> I am trying to back up a full copy of one of our databases (14G) and
> restore it on another server. Both databases run 7.3.2 version.
> Though the restore completed successfully, it took 9 hours for the
> process to complete. The destination server runs Fedora Core 3 with
> 512 MB RAM and has 1 processor.  I have also deferred referential
> intergrity checks during the restore. I tried to tune some parameters
> in the config file, but it still takes 9 hours.

Firstly, you should upgrade to the most recent version of 7.3.x (7.3.15)
- that's a *lot* of bug-fixes you are missing

Then, I would temporarily disable fsync and increase sort_mem and
checkpoint_segments. What you're trying to do is make a single process
run as fast as possible, so allow it to grab more resources than you
normally would.

--
   Richard Huxton
   Archonet Ltd