From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_restore ordering questions |
Date: | 2009-09-25 22:38:35 |
Message-ID: | 10169.1253918315@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Steve Crawford <scrawford(at)pinpointresearch(dot)com> writes:
> I am preparing to collapse two databases in a cluster into a single
> database (current step in a roadmap preparing to update a system from
> 7.4.6 up to 8.4.1).
> In testing, I have a step that dumps the schema of one of the databases,
> creates an object list, removes the unwanted objects, then restores the
> schema into an empty database. This step is failing due to attempts to
> restore views/indexes prior to creation of the referenced table. I have
> stripped it down to the minimum and it still fails:
I think that we didn't teach pg_dump about dependency ordering until 8.0
or so. If you're unlucky enough to hit this in 7.4, you have to fix it
via manual reordering of the dump items.
> 4. The recommended upgrade procedure is to use pg_dump from the newer
> PostgreSQL version. But is it safe to use an up-to-date
> pg_dump/pg_restore on an old version of PostgreSQL?
No, the dump typically won't load into an older server, at least not
without some manual editing to correct uses of newer syntax.
Why don't you update to 8.4 first and then do your other housekeeping?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-09-25 22:41:29 | Re: lazy vacuum and AccessExclusiveLock |
Previous Message | Tom Lane | 2009-09-25 22:31:24 | Re: stored procedure: RETURNS record |