Re: Restore performance? - Mailing list pgsql-performance

From PFC
Subject Re: Restore performance?
Date
Msg-id op.s7sygjtecigqcu@apollo13
Whole thread Raw
In response to Restore performance?  (Jesper Krogh <jesper@krogh.cc>)
List pgsql-performance
> I'd run pg_dump | gzip > sqldump.gz  on the old system.

    If the source and destination databases are on different machines, you
can pipe pg_dump on the source machine to pg_restore on the destination
machine by using netcat.
    If you only have 100 Mbps ethernet, compressing the data will be faster.
If you have Gb Ethernet, maybe you don't need to compress, but it doesn't
hurt to test.

    use pg_restore instead of psql, and use a recent version of pg_dump which
can generate dumps in the latest format.

    If you need fast compression, use gzip -1 or even lzop, which is
incredibly fast.

    Turn off fsync during the restore and set maintenance_work_mem to use
most of your available RAM for index creation.

    I think that creating foreign key constraints uses large joins ; it might
be good to up work_mem also.

    Check the speed of your disks with dd beforehand. You might get a
surprise.

    Maybe you can also play with the bgwriter and checkpoint parameters.


pgsql-performance by date:

Previous
From: Oscar Picasso
Date:
Subject: Better index stategy for many fields with few values
Next
From: PFC
Date:
Subject: Re: Better index stategy for many fields with few values