From: Vibhor Kumar <vibhor.aim@gmail.com>
To: Vishnu S. <vishnu.s@nestgroup.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Serial key is different in master and slave machine
Date: Sat, 18 Dec 2010 20:23:20 +0530
Message-ID: <7B18A799-CCCD-42B2-90FB-3991F7533CC4@gmail.com> (raw)
In-Reply-To: <D0124DE0373A744CA8192AFA82C831170216EA83@mail-4.tvm.nestgroup.net>
References: <D0124DE0373A744CA8192AFA82C83117558EFC@mail-4.tvm.nestgroup.net>
<21EEFF80-C6CB-451B-A87C-95D5B82F72FD@gmail.com>
<D0124DE0373A744CA8192AFA82C831170216EA83@mail-4.tvm.nestgroup.net>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: vibhor.aim@gmail.com, vishnu.s@nestgroup.net
Subject: Re: Serial key is different in master and slave machine
In-Reply-To: <7B18A799-CCCD-42B2-90FB-3991F7533CC4@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox