Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2B00F476272 for ; Mon, 23 Sep 2002 13:43:41 -0400 (EDT) Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id AA1D94765C3 for ; Mon, 23 Sep 2002 13:43:22 -0400 (EDT) Received: (qmail 6264 invoked from network); 23 Sep 2002 17:34:21 -0000 Received: from system67.trade-india-local.com (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 23 Sep 2002 17:34:21 -0000 Content-Type: text/plain; charset="us-ascii" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: pgsql-admin@postgresql.org, pgsql-replication@postgresql.org Subject: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs. Date: Mon, 23 Sep 2002 23:16:59 +0530 User-Agent: KMail/1.4.1 Cc: ssinger@navtechinc.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209232316.59721.mallah@trade-india.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/245 X-Sequence-Number: 5784 Hi=20 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 prope= rly 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 mo= mjian Exp $ Regds Mallah. tradein_clients=3D# CREATE TABLE test (a integer , b integer); CREATE tradein_clients=3D#=20 tradein_clients=3D#=20 tradein_clients=3D# CREATE TRIGGER "test_trig" AFTER INSERT OR DELETE OR UP= DATE ON "test" FOR EACH ROW EXECUTE PROCEDURE "recordchange" (); ]CREATE tradein_clients=3D#=20=20 tradein_clients=3D#=20 tradein_clients=3D# INSERT INTO test values(1,1); NOTICE: row successfully stored in pending table NOTICE: a NOTICE: 1 NOTICE: Starting format loop NOTICE: "a"=3D'1'=20 NOTICE: b NOTICE: 1 NOTICE: Starting format loop NOTICE: "a"=3D'1' "b"=3D'1'=20 NOTICE: Returning NOTICE: INSERT SUCCESFULL NOTICE: DOne storing keyinfo NOTICE: Returning on success INSERT 183571162 1 tradein_clients=3D#=20 tradein_clients=3D#=20 tradein_clients=3D# INSERT INTO test values(1,3); NOTICE: row successfully stored in pending table NOTICE: a NOTICE: 1 NOTICE: Starting format loop NOTICE: "a"=3D'1'=20 NOTICE: b NOTICE: 3 NOTICE: Starting format loop NOTICE: "a"=3D'1' "b"=3D'3'=20 NOTICE: Returning NOTICE: INSERT SUCCESFULL NOTICE: DOne storing keyinfo NOTICE: Returning on success INSERT 183571165 1 tradein_clients=3D# DELETE from test; NOTICE: row successfully stored in pending table NOTICE: Executing: SELECT indkey FROM pg_index WHERE indisprimary=3D't' AN= D indrelid=3D183571159 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. !#=20=20 --=20 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.