From: | Vibhor Kumar <vibhor(dot)aim(at)gmail(dot)com> |
---|---|
To: | Vishnu S(dot) <vishnu(dot)s(at)nestgroup(dot)net> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Serial key is different in master and slave machine |
Date: | 2010-12-18 14:53:20 |
Message-ID: | 7B18A799-CCCD-42B2-90FB-3991F7533CC4@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-12-18 18:14:27 | Re: Copying database directory |
Previous Message | Vishnu S. | 2010-12-18 12:25:52 | Serial key is different in master and slave machine |