pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: [DBmirror Issue] recordchange()  dies in packageData unless
3+ messages / 2 participants
[nested] [flat]

* Re: [DBmirror Issue] recordchange()  dies in packageData unless
@ 2002-09-23 20:48 Steven Singer <ssinger@navtechinc.com>
  2002-09-29 03:24 ` Re: [DBmirror Issue] recordchange()  dies in packageData unless Bruce Momjian <pgman@candle.pha.pa.us>
  2002-09-30 15:06 ` Re: [DBmirror Issue] recordchange()  dies in packageData unless Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Steven Singer @ 2002-09-23 20:48 UTC (permalink / raw)
  To: Rajesh Kumar Mallah. <mallah@trade-india.com>; +Cc: pgsql-admin; pgsql-replication@postgresql.org

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.


inline patch 1: /tmp/pending.c (+0/-0 lines) download inline-1.patch*** 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 ^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: [DBmirror Issue] recordchange()  dies in packageData unless
  2002-09-23 20:48 Re: [DBmirror Issue] recordchange()  dies in packageData unless Steven Singer <ssinger@navtechinc.com>
@ 2002-09-29 03:24 ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2002-09-29 03:24 UTC (permalink / raw)
  To: Steven Singer <ssinger@navtechinc.com>; +Cc: Rajesh Kumar Mallah. <mallah@trade-india.com>; pgsql-admin; pgsql-replication@postgresql.org


Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

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


Steven Singer wrote:
> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [DBmirror Issue] recordchange()  dies in packageData unless
  2002-09-23 20:48 Re: [DBmirror Issue] recordchange()  dies in packageData unless Steven Singer <ssinger@navtechinc.com>
@ 2002-09-30 15:06 ` Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2002-09-30 15:06 UTC (permalink / raw)
  To: Steven Singer <ssinger@navtechinc.com>; +Cc: Rajesh Kumar Mallah. <mallah@trade-india.com>; pgsql-admin; pgsql-replication@postgresql.org


Patch withdrawn by author.  Newer version already applied.

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

Steven Singer wrote:
> 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-09-30 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-23 20:48 Re: [DBmirror Issue] recordchange()  dies in packageData unless Steven Singer <ssinger@navtechinc.com>
2002-09-29 03:24 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-09-30 15:06 ` Bruce Momjian <pgman@candle.pha.pa.us>

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