From: | "Carl M(dot) Nasal II" <cnasal(at)bmaenterprises(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | PostgreSQL Server Crash using plPHP or PL/Perl |
Date: | 2006-07-11 21:43:48 |
Message-ID: | 44B41B94.6060903@bmaenterprises.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Mitch.Logue | 2006-07-11 21:57:49 | Including C/C++ header files containing #defines using EXEC SQL INCLUDE |
Previous Message | Eric B. Ridge | 2006-07-11 21:32:22 | Re: doesn't recognize "!=-" (not equal to a negative value) |