From: bhanu udaya <udayabhanu1984@hotmail.com>
To: Chris Travers <chris.travers@gmail.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: François Beausoleil <francois@teksol.info>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: pg_Restore
Date: Mon, 21 Jan 2013 20:40:05 +0530
Message-ID: <COL002-W40742820203F6CA7F83992D3170@phx.gbl> (raw)
In-Reply-To: <CAKt_Zfty6HDmEhU+-Jue+s8Q5u8vfPJrbQnNA5O4ROhtpWXKCQ@mail.gmail.com>
References: <COL002-W91D920E81B347335FEE275D3100@phx.gbl>
<COL002-W617531EF00D8D476E3F90CD3170@phx.gbl>
<205AA39F-C998-4628-9AE9-430C4061CDF8@teksol.info>
<COL002-W85138B69892E14D07066A5D3170@phx.gbl>
<CABUevEze1gmkq1eXzF=tHkpyUXYDz6TjjT8KhwgRUhDReyXmvg@mail.gmail.com>
<COL002-W496618C32835A9B194AE07D3170@phx.gbl>
<A737B7A37273E048B164557ADEF4A58B0579BFDF@ntex2010a.host.magwien.gv.at>
<CAKt_Zfty6HDmEhU+-Jue+s8Q5u8vfPJrbQnNA5O4ROhtpWXKCQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Hello,Thanks alot for all your replies. I tried all settings suggested, it did not work. pg_restore is very slow. It does not come out less than 1 1/2 hour. Can you please let me know the procedure for Template. Will it restore the data also . Please update. I need the database (metadata + data) to be restored back after certain Java executions. Ex:- I have 9.5 gb database (with 500 schemas + data). This is treated as base database and it needs to be restored every time after certain transactions. Thanks for your reply. Thanks and REgardsRadha Krishna
Date: Mon, 21 Jan 2013 04:16:19 -0800
Subject: Re: [GENERAL] pg_Restore
From: chris.travers@gmail.com
To: laurenz.albe@wien.gv.at
CC: udayabhanu1984@hotmail.com; magnus@hagander.net; francois@teksol.info; pgsql-general@postgresql.org
On Mon, Jan 21, 2013 at 3:39 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
bhanu udaya wrote:
> I tried with all the below options. It approximatly takes 1 hour 30 minutes for restoring a 9GB
> database. This much time can not be affordable as the execution of test cases take only 10% of this
> whole time and waiting 1 hour 30 minutes after every test case execution is alot for the team. Kindly
> let me know if we can reduce the database restoration time .
I don't know if that helps, but have you tried creating a template database
and doing DROP DATABASE xxx; CREATE DATABASE xxx TEMPLATE mytemplate;
instead of restoring a dump every time?
Also for test cases, my preferred way is to put every test case in a transaction that cannot commit. This way the tests are safe to run on production environments. See pgTAP for one possibility here if you are testing stored procedures. (Application code we run through wrappers that filter out commits.)
But also the template approach is a good one fi you cannot guarantee that the tests always role back.
Best Wishes,Chris Travers =
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: udayabhanu1984@hotmail.com, chris.travers@gmail.com, laurenz.albe@wien.gv.at, magnus@hagander.net, francois@teksol.info
Subject: Re: pg_Restore
In-Reply-To: <COL002-W40742820203F6CA7F83992D3170@phx.gbl>
References: <COL002-W91D920E81B347335FEE275D3100@phx.gbl> <COL002-W617531EF00D8D476E3F90CD3170@phx.gbl> <205AA39F-C998-4628-9AE9-430C4061CDF8@teksol.info> <COL002-W85138B69892E14D07066A5D3170@phx.gbl> <CABUevEze1gmkq1eXzF=tHkpyUXYDz6TjjT8KhwgRUhDReyXmvg@mail.gmail.com> <COL002-W496618C32835A9B194AE07D3170@phx.gbl> <A737B7A37273E048B164557ADEF4A58B0579BFDF@ntex2010a.host.magwien.gv.at> <CAKt_Zfty6HDmEhU+-Jue+s8Q5u8vfPJrbQnNA5O4ROhtpWXKCQ@mail.gmail.com> <COL002-W40742820203F6CA7F83992D3170@phx.gbl>
* 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