pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Ernst <cernst@zvelo.com>
To: pgsql-general@postgresql.org
To: udayabhanu1984@hotmail.com
Subject: Re: pg_Restore
Date: Mon, 21 Jan 2013 07:19:53 -0700
Message-ID: <50FD4E89.3050805@zvelo.com> (raw)
In-Reply-To: <COL002-W85138B69892E14D07066A5D3170@phx.gbl>
References: <COL002-W91D920E81B347335FEE275D3100@phx.gbl>
	<COL002-W617531EF00D8D476E3F90CD3170@phx.gbl>
	<205AA39F-C998-4628-9AE9-430C4061CDF8@teksol.info>
	<COL002-W85138B69892E14D07066A5D3170@phx.gbl>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 01/20/2013 11:17 PM, bhanu udaya wrote:
> I am trying to restore 9.5G database (1GB dumpfile) which has 500
> schemas with 1 lakh rows in each schema. Could take the data dump using
> pg_dump and it takes around 40 minutes. I tried to use pg_restore to
> restore this dump, but it takes hours to restore the dump. I have used
> the configurations parameters as
....
> But, have same problem. It is almost 1 hour now, the restoration is
> still going on.  After every test case execution, we would like to
> refresh the database and expected refresh should be completed in less
> than 10 minutes. Is this achievable with the kind of configuration I
> have listed in my earlier email.

Probably not what you want to hear, but I think This is a completely
unrealistic expectation.  If it takes 40 minutes for pg_dump, I would
expect pg_restore to take at least as long and likely significantly
longer (assuming both are done on similar hardware).

pg_dump only has to read the schema(s) and data and write them to a
file.  pg_restore has to read write the schema and  data into a new
database *AND* re-create all of the indexes, analyze, check referential
integrity......

So if the dump is taking 40 minutes, I would expect the restore to take
somewhere in the 60-90 minute range, depending on the number of and
complexity of the indexing.

	- Chris


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (67+ messages)  latest in thread

Message-ID: <50FD4E89.3050805@zvelo.com>
Permalink:  ../50FD4E89.3050805@zvelo.com/
Also on:    postgresql.org/message-id/50FD4E89.3050805@zvelo.com

 · 

reply

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: cernst@zvelo.com, udayabhanu1984@hotmail.com
  Subject: Re: pg_Restore
  In-Reply-To: <50FD4E89.3050805@zvelo.com>
  References: <COL002-W91D920E81B347335FEE275D3100@phx.gbl> <COL002-W617531EF00D8D476E3F90CD3170@phx.gbl> <205AA39F-C998-4628-9AE9-430C4061CDF8@teksol.info> <COL002-W85138B69892E14D07066A5D3170@phx.gbl> <50FD4E89.3050805@zvelo.com>

* 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