From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: pgsql-admin@postgresql.org
To: pgsql-replication@postgresql.org
Cc: ssinger@navtechinc.com
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
Message-ID: <200209232316.59721.mallah@trade-india.com> (raw)
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.
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, pgsql-replication@postgresql.org, ssinger@navtechinc.com
Subject: Re: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.
In-Reply-To: <200209232316.59721.mallah@trade-india.com>
References: <200209232316.59721.mallah@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