The following issue has been RESOLVED. ====================================================================== http://www.dbmail.org/mantis/view.php?id=282 ====================================================================== Reported By: ryo Assigned To: paul ====================================================================== Project: DBMail Issue ID: 282 Category: General Reproducibility: sometimes Severity: minor Priority: normal Status: resolved target: 2.1.7 Resolution: fixed Fixed in Version: SVN Trunk ====================================================================== Date Submitted: 08-Nov-05 02:21 CET Last Modified: 21-Jun-06 16:35 CEST ====================================================================== Summary: PostgreSQL Error "current transaction is aborted, commands ignored until end of transaction block" Description: The program keeps executing a query even after db_query() fails when it is called from insert_address_cache() and insert_field_cache() in dbmail-message.c. That is because the first argument of trace() function is TRACE_WARNING.
However, unless a program publishes a "commit" or a "rollback" to PostgreSQL after such a query fails in a transaction, the program will continue to fail executing the rest of all queries on PostgreSQL due to the error below: ERROR: current transaction is aborted, commands ignored until end of transaction block For example, if the daemon dbmail-lmtpd inserts a string of more than 100 chars to dbmail_fromfield.fromname, dbmail's logs will be filled with the messages as described at "Additional Information" below. (Please refer to it.) Then, insert_messages() function fails as well. In order for us to get rid of such a problem, I made a patch that will publish a rollback when db_query() fails in insert_address_cache() and insert_field_cache(). Please see the uploaded file. ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0000322 optional dbmail_filters can break delivery related to 0000357 2.1.6 breaks compatibility with Postgre... ====================================================================== ---------------------------------------------------------------------- paul - 30-Apr-06 17:52 ---------------------------------------------------------------------- patch applied ---------------------------------------------------------------------- paul - 16-Jun-06 13:51 ---------------------------------------------------------------------- patch reverted, fix pending ---------------------------------------------------------------------- paul - 21-Jun-06 16:35 ---------------------------------------------------------------------- Added dm_strnesc function to properly truncated escaped strings. Issue History Date Modified Username Field Change ====================================================================== 08-Nov-05 02:21 ryo New Issue 08-Nov-05 02:21 ryo File Added: dbmail-cache-savepoint.patch 27-Jan-06 21:02 paul Status new => assigned 27-Jan-06 21:02 paul Assigned To => paul 30-Apr-06 17:36 paul Relationship added related to 0000322 30-Apr-06 17:52 paul Note Added: 0001145 30-Apr-06 17:52 paul Status assigned => resolved 30-Apr-06 17:52 paul Resolution open => fixed 30-Apr-06 17:52 paul Fixed in Version => SVN Trunk 16-Jun-06 13:51 paul target => 2.1.7 16-Jun-06 13:51 paul Note Added: 0001250 16-Jun-06 13:51 paul Resolution fixed => reopened 16-Jun-06 13:51 paul Status resolved => assigned 16-Jun-06 13:52 paul Relationship added related to 0000357 21-Jun-06 16:35 paul Note Added: 0001259 21-Jun-06 16:35 paul Status assigned => resolved 21-Jun-06 16:35 paul Resolution reopened => fixed ======================================================================