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

Поиск
Список
Период
Сортировка
От Rajesh Kumar Mallah.
Тема [DBmirror Issue] recordchange() dies in packageData unless there is aPRIMARY KEY on DELETE and UPDATEs.
Дата
Msg-id 200209232316.59721.mallah@trade-india.com
обсуждение исходный текст
Ответы Re: [DBmirror Issue] recordchange() dies in packageData unless  (Steven Singer <ssinger@navtechinc.com>)
Список 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.




В списке pgsql-admin по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: command line client on windows?
Следующее
От:
Дата:
Сообщение: Re: [DBmirror Issue] recordchange() dies in packageData unless there is a PRIMARY KEY on DELETE and UPDATEs.