pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: patrick keshishian <pkeshish@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: pg 7.4.x - pg_restore impossibly slow
Date: Thu, 13 Apr 2006 23:15:17 -0400
Message-ID: <4413.1144984517@sss.pgh.pa.us> (raw)
In-Reply-To: <53b425b00604131826s2872bd49id2ac1ab99a5fade4@mail.gmail.com>
References: <53b425b00604121826x213fe2fdmc793e22026469923@mail.gmail.com>
	<9585.1144903611@sss.pgh.pa.us>
	<53b425b00604131826s2872bd49id2ac1ab99a5fade4@mail.gmail.com>

"patrick keshishian" <pkeshish@gmail.com> writes:
> With these settings and running:
> pg_restore -vaOd dbname dbname.DUMP

If you had mentioned you were using random nondefault switches, we'd
have told you not to.  -a in particular is a horrid idea performancewise
--- a standard schema-plus-data restore goes way faster because it's
doing index builds and foreign key checks wholesale instead of
incrementally.

> Is this because the -c option drops all foreign keys and
> so the restore goes faster?  Should this be the preferred,
> recommended and documented method to run pg_restore?

It is documented in recent versions of the documentation: see
http://www.postgresql.org/docs/8.1/static/populate.html
particularly the last section.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <4413.1144984517@sss.pgh.pa.us>
Permalink:  ../4413.1144984517@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4413.1144984517@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pkeshish@gmail.com
  Subject: Re: pg 7.4.x - pg_restore impossibly slow
  In-Reply-To: <4413.1144984517@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