PostgreSQL Server Crash using plPHP or PL/Perl - Mailing list pgsql-general

From Carl M. Nasal II
Subject PostgreSQL Server Crash using plPHP or PL/Perl
Date
Msg-id 44B41B94.6060903@bmaenterprises.com
Whole thread Raw
Responses Re: PostgreSQL Server Crash using plPHP or PL/Perl  (Agent M <agentm@themactionfaction.com>)
Re: PostgreSQL Server Crash using plPHP or PL/Perl  ("Ian Barwick" <barwick@gmail.com>)
List pgsql-general
We are writing a multi-master replication process for our Electronic
Medical Records product.  We have written triggers in plPHP and then in
PL/Perl to keep an audit trail of the changes as well as flags so the data
can be replicated.  We started with plPHP, but then server started
crashing, which reset all connections to the database (requiring our
application to be restarted).  We then tried to rewrite the code using
PL/Perl, but the same problem has occurred.  The code for the triggers are
available at:

http://medical.bmaenterprises.com/audit.plphp
http://medical.bmaenterprises.com/audit.plperl

We create the triggers by running the follow SQL statement for each table:

CREATE TRIGGER config_audit AFTER INSERT OR UPDATE OR DELETE ON config FOR
EACH ROW EXECUTE PROCEDURE audit();

Any ideas of what is causing the server to crash will be helpful.

Below are the lines from the PostgreSQL serverlog file when the crash occurs:
----------------------------------------------------------------------------
LOG:  server process (PID 29153) exited with exit code 255
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted at 2006-07-11 16:01:32 EDT
LOG:  checkpoint record is at 1/F413F26C
LOG:  redo record is at 1/F413F26C; undo record is at 0/0; shutdown FALSE
LOG:  next transaction ID: 7628670; next OID: 693120
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system was not properly shut down; automatic recovery in
progress
LOG:  redo starts at 1/F413F2B0
LOG:  record with zero length at 1/F4186D3C
LOG:  redo done at 1/F4186D14
LOG:  database system is ready
LOG:  transaction ID wrap limit is 2147484146, limited by database "postgres"


Thank you,
Carl M. Nasal II
BMA Enterprises, Inc.

pgsql-general by date:

Previous
From:
Date:
Subject: Including C/C++ header files containing #defines using EXEC SQL INCLUDE
Next
From: "Eric B. Ridge"
Date:
Subject: Re: doesn't recognize "!=-" (not equal to a negative value)