Search Postgresql Archives

Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/14/07, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux