pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Luís Sousa <llsousa@ualg.pt>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Problem using pg_restore with -a option
Date: Fri, 1 Sep 2006 11:43:04 -0400
Message-ID: <20060901154304.GF3755@alvh.no-ip.org> (raw)
In-Reply-To: <44F84649.9050502@ualg.pt>
References: <44F84649.9050502@ualg.pt>

Luís Sousa wrote:
> Hi all,
> 
> I'm using PostgreSQL 7.4.7-6sarge2 (debian)
> 
> Using the schema below, doing a pg_dump -Fc, delete all data, and a
> pg_restore -a, the sequence of inserting data isn't correct issuing an
> error.
> Could this be a bug?

Not a bug -- rather a known deficiency.  pg_dump 8.0 and beyond knows
how to sort stuff so that these problems do not occur, but 7.4 doesn't.

The typical workaround was to use pg_restore -l/-L to generate the list
of objects to restore and sort them appropiately, then do the actual
restore.

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



view thread (3+ messages)  latest in thread

Message-ID: <20060901154304.GF3755@alvh.no-ip.org>
Permalink:  ../20060901154304.GF3755@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20060901154304.GF3755@alvh.no-ip.org

 · 

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-admin@postgresql.org
  Cc: alvherre@commandprompt.com, llsousa@ualg.pt
  Subject: Re: Problem using pg_restore with -a option
  In-Reply-To: <20060901154304.GF3755@alvh.no-ip.org>
  References: <44F84649.9050502@ualg.pt> <20060901154304.GF3755@alvh.no-ip.org>

* 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