Nagaraja, Madhukar (Madhukar) mnagaraja at alcatel-lucent.com
Wed Jun 17 08:10:39 PDT 2009
Hi all,
I encounted the problem again. The solution I mentioned in the previous mail did not work. Actually now I have a couple of problems more.

1) After I do a switchover, on some tables the insert fails the first time and then it works. On one of the table the insert fails all the time.(this was slave previously). But when I again do a switchover again(the original master) it is able to insert.

2) I think the index is not repliating on the tables. The insert is failing the first time on switchover is because the  when I do a select on the tables(select last_value from cfg_usermgr_laptoptable_ev_id_seq; ) I get value of the last exisiting pkey value.  So it fails always the first time.

On one of the tables( select last_value from cfgconnmgrruletable_ev_id_seq) I am getting the value as 6 whereas there are 70 entries in the DB.

Can you please help me as soon as possbile.. We have a release coming up.

Thanks.

-----Original Message-----
From: Nagaraja, Madhukar (Madhukar)
Sent: Tuesday, June 16, 2009 6:39 PM
To: 'slony1-general at lists.slony.info'
Subject: RE: Switchover issue

Found out the issue.
The problem was we stop the postgresql but the slon daemons were still running. So when we resart our application which also starts the postgersql the slon daemons tried to connect to the postgre on the old connection I guess and it used to restart the postgresql. So bcos of this the postgresql gave this primary key voilation error.. Which is totally invalid.

So the solution was we also stop and start slon daemons as part of our application restart. After this it started working.

Thanks.

------------------------------

Message: 3
Date: Fri, 12 Jun 2009 09:54:12 -0400
From: Andrew Sullivan <ajs at crankycanuck.ca>
Subject: Re: [Slony1-general] Switchover issue.
To: slony1-general at lists.slony.info
Message-ID: <20090612135412.GA36147 at shinkuro.com>
Content-Type: text/plain; charset=us-ascii

On Fri, Jun 12, 2009 at 01:20:56PM +0530, Nagaraja, Madhukar (Madhukar) wrote:

> switchover from the GUI, evrything seems quite ok. But when we trying
> adding new entries from the GUI, we get a very vague PSQL exception -
> duplicate entry primary key voilation.

That doesn't sound vague to me.  It sounds like a perfectly clear message.  My bet is that you're tripping over a sequence value that is set too low or something like that.  But without seeing the actual exception message, instead of your vague description of it, I can't say more.

A


--
Andrew Sullivan
ajs at crankycanuck.ca


------------------------------

Message: 4
Date: Fri, 12 Jun 2009 11:36:44 -0700
From: David Rees <drees76 at gmail.com>
Subject: Re: [Slony1-general] Switchover issue.
To: slony1-general at lists.slony.info
Message-ID:
        <72dbd3150906121136r3e2bfc4dt6b68312424de4788 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jun 12, 2009 at 6:54 AM, Andrew Sullivan<ajs at crankycanuck.ca> wrote:
> On Fri, Jun 12, 2009 at 01:20:56PM +0530, Nagaraja, Madhukar (Madhukar) wrote:
>
>> switchover from the GUI, evrything seems quite ok. But when we trying
>> adding new entries from the GUI, we get a very vague PSQL exception -
>> duplicate entry primary key voilation.
>
> That doesn't sound vague to me. ?It sounds like a perfectly clear
> message. ?My bet is that you're tripping over a sequence value that is
> set too low or something like that. ?But without seeing the actual
> exception message, instead of your vague description of it, I can't
> say more.

I would guess that a sequence isn't getting replicated and should be, which is why you run in to the duplicate key issues after switching nodes.

-Dave



More information about the Slony1-general mailing list