From: Tom Lane <tgl@sss.pgh.pa.us>
To: ogjunk-pgjedan@yahoo.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Fastest DB restore options
Date: Thu, 22 Feb 2007 11:25:21 -0500
Message-ID: <5872.1172161521@sss.pgh.pa.us> (raw)
In-Reply-To: <821429.69798.qm@web50304.mail.yahoo.com>
References: <821429.69798.qm@web50304.mail.yahoo.com>
ogjunk-pgjedan@yahoo.com writes:
> I normally dump with these options:
> -d MyDB --clean --inserts --column-inserts --format=P
> But the last time I tried that, the restore took foreeeeeeeeeeeeeever.
--inserts is pretty expensive.
> So I'm looking for the fastest way to import data from the old DB to the new one. Judging from pg_dump man page the following should be the fastest dump & restore:
> -d MyDB --format=c --ignore-version
Don't use --ignore-version; it's a good way to shoot yourself in the foot.
pg_dump's default behavior is about as good as you can get; there are no
optional switches that will make it faster. What you *can* do is make
sure that the receiving system is properly configured before you start
the restore --- increase maintenance_work_mem and checkpoint_segments
in particular. See this page, especially the last section:
http://www.postgresql.org/docs/8.2/static/populate.html
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, ogjunk-pgjedan@yahoo.com
Subject: Re: Fastest DB restore options
In-Reply-To: <5872.1172161521@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox