Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5
От | Mason Hale |
---|---|
Тема | Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5 |
Дата | |
Msg-id | 8bca3aa10704141151l676f9b28ydc6eb1fb6a69a681@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5
|
Список | pgsql-general |
On 4/14/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
That was it, exactly. Thanks. I dropped the unused entry_id_seq, and renamed
the existing sequence using an ALTER TABLE .. RENAME TO statement.
I assume it would not be advisable to use the 8.2 version of pg_dump, if I intend to restore to an 8.1 database, correct?
thanks again,
Mason
Hmm ... which sequence is entry.id actually referring to on the source
database? I suspect that it is linked to some differently-named
sequence like "entry_id_seq1" and the source's "entry_id_seq" is not
in truth doing anything (and, in particular, hasn't ever been advanced,
so when the restore script sets its value to 1 it's clobbering the other
sequence).
That was it, exactly. Thanks. I dropped the unused entry_id_seq, and renamed
the existing sequence using an ALTER TABLE .. RENAME TO statement.
The methodology that pre-8.2 pg_dump uses for serial columns is
vulnerable to quite a number of problems if serial sequences don't have
the expected names, and this seems to be another one.
I assume it would not be advisable to use the 8.2 version of pg_dump, if I intend to restore to an 8.1 database, correct?
thanks again,
Mason
В списке pgsql-general по дате отправления: