Re: Restore db - Mailing list pgsql-general

From Ondrej Ivanič
Subject Re: Restore db
Date
Msg-id CAM6mieLSg=AiUuNmyUVkXP_8A40WC8g2q0tAQdXnjBfG2JfnVg@mail.gmail.com
Whole thread Raw
In response to Restore db  (Alexander Burbello <burbello@yahoo.com.br>)
List pgsql-general
Hi,

On 14 November 2011 11:09, Alexander Burbello <burbello@yahoo.com.br> wrote:
> What can I do to tune this database to speed up this restore??
> My current db parameters are:
> shared_buffers = 256MB
> maintenance_work_mem = 32MB

You should increase maintenance_work_mem as much as you can.
full_page_writes, archive_mode and auto_vacuum should be disable
during restore. Increase checkpoint_segments (for example to 64) and
set wal_buffers to 16MB. 8.4 introduced parallel restore (pg_restore
option -j <num jobs>).

Maybe you can't do anything mentioned above because it is not possible
to restart server (you can change maintenance_work_mem via PGOPTIONS)
or there is a single table to import (-j is not aplicable) -- try to
drop indexes and recreate them after import.

--
Ondrej Ivanic
(ondrej.ivanic@gmail.com)

pgsql-general by date:

Previous
From: Alexander Burbello
Date:
Subject: Restore db
Next
From: Andy Colson
Date:
Subject: Re: Restore db