On Dec 18, 2010, at 5:55 PM, Vishnu S. wrote:
>
>
> Hi,
>
>
> I am usinf Slony slony-I-2.0.2 in windows. I have a Master and a slave
> machine. When the master machine is failed, I have executed the failover
> script and the slave is switched to master. My problem is that while
> inserting a record into the current master machine, it will show an
> error saying that Duplicate key value. Please help me to overcome this
> error
This means you haven't replicated the Sequences using Slony on Slave.
To overcome this problem, you have reset the sequences on New Master using Following command:
SELECT pg_catalog.setval('<sequencenumber>', <nextvalof sequence on Old Master>, true);
Thanks & Regards,
Vibhor Kumar (PCP & OCP)
ITIL V3 Cerftified.