Re: Fastest DB restore options

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ogjunk-pgjedan(at)yahoo(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Fastest DB restore options
Date: 2007-02-22 18:13:58
Message-ID: 20070222181358.GM4276@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

ogjunk-pgjedan(at)yahoo(dot)com wrote:

> > -d MyDB --format=c --ignore-version
>
> Don't use --ignore-version; it's a good way to shoot yourself in the foot.
>
> OG: even when upgrading (8.0.3 -> 8.2.3)? I'll dump with pg_dump from 8.0.3 and them import with pg_restore from the newly installed 8.2.3. Wouldn't I *have to* use --ignore-version for that to work?

The recommended procedure is to use 8.2.3's pg_dump, not 8.0's, to
connect to the old database. And no, you don't need --ignore-version
for that, because pg_dump knows how to talk to previous server versions.
That switch is there only for connecting to a database of a _newer_
version that pg_dump's, and it's generally problematic because sometimes
an older pg_dump doesn't know how to read the newer system catalogs.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joshua D. Drake 2007-02-22 18:17:14 Re: Online archiving
Previous Message Karthikeyan Sundaram 2007-02-22 18:12:36 Online archiving