pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mallah@trade-india.com
To: ssinger@navtechinc.com
Cc: mallah@trade-india.com
Cc: pgsql-admin@postgresql.org
Cc: pgsql-replication@postgresql.org
Subject: Re: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.
Date: Tue, 24 Sep 2002 03:33:50 +0530 (IST)
Message-ID: <48619.203.145.129.4.1032818630.squirrel@mail.trade-india.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0209232040340.14610-100000@pcNavYkfAdm1.ykf.navtechinc.com>
References: <200209232316.59721.mallah@trade-india.com>
	<Pine.LNX.4.33.0209232040340.14610-100000@pcNavYkfAdm1.ykf.navtechinc.com>

Hi Steven ,

thanks for the reply and letting me know that a primary key is
essential for the replicated tables.

For your information pending.c used to crash postmaster even
when it was not in debug mode. (it was only then i defined
DEBUG_OUTPUT to see whats going on).

Thanks for the patch. But what will it say when there is no
primary key in the table?

anyway i will apply the patch and let u know.

I am using dbmirror for asynchronous replication so speen of
replication is not important.

Regards
Mallah.

> 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@navtechinc.com Aircraft Performance
> Systems                Phone:  519-747-1170 ext 282 Navtech Systems Support Inc.
> AFTN:   CYYZXNSX SITA: YYZNSCR Waterloo, Ontario                           ARINC:  YKFNSCR



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/





view thread (6+ messages)  latest in thread

Message-ID: <48619.203.145.129.4.1032818630.squirrel@mail.trade-india.com>
Permalink:  ../48619.203.145.129.4.1032818630.squirrel@mail.trade-india.com/
Also on:    postgresql.org/message-id/48619.203.145.129.4.1032818630.squirrel@mail.trade-india.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mallah@trade-india.com, ssinger@navtechinc.com, pgsql-replication@postgresql.org
  Subject: Re: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.
  In-Reply-To: <48619.203.145.129.4.1032818630.squirrel@mail.trade-india.com>
  References: <200209232316.59721.mallah@trade-india.com> <Pine.LNX.4.33.0209232040340.14610-100000@pcNavYkfAdm1.ykf.navtechinc.com> <48619.203.145.129.4.1032818630.squirrel@mail.trade-india.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