Re: [DBmirror Issue] recordchange() dies in packageData unless

From: Steven Singer <ssinger(at)navtechinc(dot)com>
To: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>, <pgsql-replication(at)postgresql(dot)org>
Subject: Re: [DBmirror Issue] recordchange() dies in packageData unless
Date: 2002-09-23 20:48:39
Message-ID: Pine.LNX.4.33.0209232040340.14610-100000@pcNavYkfAdm1.ykf.navtechinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 23 Sep 2002, Rajesh Kumar Mallah. wrote:

> Hi
>
> Is anyone using dbmirror in production?

We've been using it in production for sometime now and haven't been having
any problems with it.

>
> I Intend to replicate a set of tables between local and remote servers.
> and plan to use dbmirror.
>

The speed of replicating edits over a WAN isn't that great.
If you perform a lot of edits in a short period of time there could be a
backlog.

> I observe that unless a table has a primary key the trigger recordchange()
> which is supposed to be attached to a replicated table does not works properly
> and causes postmaster to crash.
>

dbmirror requires that all tables that you replicate have primary
keys(This should be said more explictly in the README)

However it still should not crash(In defence it will only crash the
postmaster when you compile dbmirror in debug mode).

The attatched patch to pending.c should prevent it from crashing the
postmaster. Let me know if it fixes the problem and I'll submit it to
pgpatches.

*** pending.c Mon Sep 23 20:24:04 2002
--- /tmp/pending.c Mon Sep 23 20:23:43 2002
***************
*** 226,232 ****
/* pplan = SPI_saveplan(pplan); */
cpKeyData = packageData(tTupleData, tTupleDesc, tpTrigData,
PRIMARY);
#if defined DEBUG_OUTPUT
! elog(NOTICE, cpKeyData);
#endif
saPlanData[0] = PointerGetDatum(cpKeyData);

--- 226,235 ----
/* pplan = SPI_saveplan(pplan); */
cpKeyData = packageData(tTupleData, tTupleDesc, tpTrigData,
PRIMARY);
#if defined DEBUG_OUTPUT
! if(cpKeyData != NULL )
! {
! elog(NOTICE, cpKeyData);
! }
#endif
saPlanData[0] = PointerGetDatum(cpKeyData);

--
Steven Singer ssinger(at)navtechinc(dot)com
Aircraft Performance Systems Phone: 519-747-1170 ext 282
Navtech Systems Support Inc. AFTN: CYYZXNSX SITA: YYZNSCR
Waterloo, Ontario ARINC: YKFNSCR

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message mallah 2002-09-23 22:03:50 Re: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.
Previous Message Rajesh Kumar Mallah. 2002-09-23 17:46:59 [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.