[DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: pgsql-admin(at)postgresql(dot)org, pgsql-replication(at)postgresql(dot)org
Cc: ssinger(at)navtechinc(dot)com
Subject: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.
Date: 2002-09-23 17:46:59
Message-ID: 200209232316.59721.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

Is anyone using dbmirror in production?

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

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.

INSERT works but not update and deletes.

below is a debug outputing from pending.c

I am using 7.2.1 and DBmirror: $Id: pending.c,v 1.1 2002/06/23 21:58:08 momjian Exp $

Regds
Mallah.

tradein_clients=# CREATE TABLE test (a integer , b integer);
CREATE
tradein_clients=#
tradein_clients=#
tradein_clients=# CREATE TRIGGER "test_trig" AFTER INSERT OR DELETE OR UPDATE ON "test" FOR EACH ROW EXECUTE PROCEDURE "recordchange" ();
]CREATE
tradein_clients=#
tradein_clients=#
tradein_clients=# INSERT INTO test values(1,1);
NOTICE: row successfully stored in pending table
NOTICE: a
NOTICE: 1
NOTICE: Starting format loop
NOTICE: "a"='1'
NOTICE: b
NOTICE: 1
NOTICE: Starting format loop
NOTICE: "a"='1' "b"='1'
NOTICE: Returning
NOTICE: INSERT SUCCESFULL
NOTICE: DOne storing keyinfo
NOTICE: Returning on success
INSERT 183571162 1
tradein_clients=#
tradein_clients=#
tradein_clients=# INSERT INTO test values(1,3);
NOTICE: row successfully stored in pending table
NOTICE: a
NOTICE: 1
NOTICE: Starting format loop
NOTICE: "a"='1'
NOTICE: b
NOTICE: 3
NOTICE: Starting format loop
NOTICE: "a"='1' "b"='3'
NOTICE: Returning
NOTICE: INSERT SUCCESFULL
NOTICE: DOne storing keyinfo
NOTICE: Returning on success
INSERT 183571165 1
tradein_clients=# DELETE from test;
NOTICE: row successfully stored in pending table
NOTICE: Executing: SELECT indkey FROM pg_index WHERE indisprimary='t' AND indrelid=183571159
NOTICE: Could not select primary index key
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Steven Singer 2002-09-23 20:48:39 Re: [DBmirror Issue] recordchange() dies in packageData unless
Previous Message mallah 2002-09-23 16:44:36 Re: command line client on windows?