Re: Trouble restoring 7.2.1 database into 7.4.2 database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trouble restoring 7.2.1 database into 7.4.2 database
Дата
Msg-id 24720.1081515066@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trouble restoring 7.2.1 database into 7.4.2 database  ("Chris White (cjwhite)" <cjwhite@cisco.com>)
Список pgsql-admin
"Chris White (cjwhite)" <cjwhite@cisco.com> writes:
> When I restore a backup into a 7.4.2 database from a backup made on
> 7.2.1 database, using the clean option, I get the following error.
>
> pg_restore: [archiver (db)] could not execute query: ERROR:  sequence
> "vm_emailjob_jobid_seq" does not exist
>
> Looks like the Drop table is also deleting the sequence.

Yup, serial columns work that way since 7.3 or so.  Unfortunately 7.2's
pg_dump does not know that.

> How can I get around this?

Don't use --clean, or use 7.4's pg_dump to dump from the older server.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: parameter to control cycle detection
Следующее
От: Ben Kim
Дата:
Сообщение: sequence value of the record just inserted.