Re: Trouble restoring 7.2.1 database into 7.4.2 database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cjwhite(at)cisco(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Trouble restoring 7.2.1 database into 7.4.2 database
Date: 2004-04-09 12:51:06
Message-ID: 24720.1081515066@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Chris White (cjwhite)" <cjwhite(at)cisco(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ben Kim 2004-04-09 14:59:04 sequence value of the record just inserted.
Previous Message Tom Lane 2004-04-09 12:44:26 Re: parameter to control cycle detection