Re: pg_restore ordering questions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore ordering questions
Дата
Msg-id 10169.1253918315@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore ordering questions  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Steve Crawford <scrawford@pinpointresearch.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stored procedure: RETURNS record
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: lazy vacuum and AccessExclusiveLock