Re: Duplicate Data insertion

From: Douglas Toltzman <doug(at)oakstreetsoftware(dot)com>
To: "Ponmalar Dhanuskodi" <ponmalar(dot)ttcpl(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Duplicate Data insertion
Date: 2007-06-14 11:13:22
Message-ID: 0234586E-7628-41C8-A8A7-D6F98685AEC3@oakstreetsoftware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

What versions of PostgreSQL are you using? I've observed some
changes in the handling of serial columns in backup/restore from
version 7.x to 8.x. It is possible that your sequences aren't being
restored correctly. It would be pretty easy to manually set starting
sequence values. It is pretty hard to offer any concrete advise
without knowing what version of code you're running on both systems.
You might also tell us what platform(s) you are using.

On Jun 14, 2007, at 5:26 AM, Ponmalar Dhanuskodi wrote:

> Hi,
> when we are using the postgreSQL in one system
> and inserting data in the table.when we are taking the backup of
> the postgresql Database and Restoring in another system and
> inserting the data in the table in the restored system then this
> error is coming "Duplicate Key Insertion" because the bigserial we
> are declaring in the table is incremented 10 for example in backup
> system and in the system we restored the serial is again starting
> from 1 then this error is displayed.In the restored system even if
> the table contains 10 records the sequence number is showing
> 1.sequence number is not changing.Please give any suggestions.
>
> With Regards,
>
> Ponmalar.D

Douglas Toltzman
doug(at)oakstreetsoftware(dot)com
(910) 526-5938

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Filip Krska 2007-06-15 12:53:14 BUG #3387: mod on non-integer returns bad result
Previous Message Ponmalar Dhanuskodi 2007-06-14 09:26:46 Duplicate Data insertion