I'm using V6.5. I want to write trigger to update database transaction logs. I have followed the examples, but have now run into some problems. I'm using plpsql to create a function for the trigger. I don't want to end up with very large transaction log tables and not all fields from a table will go to the log, so i want to compare old and new values of certain fields before adding transaction records. I get the following error when I try to create the trigger in my database: pgReadData() -- backend closed the channel unexpectedly. This probably menas the backend terminated abnormally before or while processing the request. We have lost the connection to the backend, so further processing is impossible. Tom said that it seems to be a bug and asked for backtrace. The problem is, after numerous tries, I'm still unable to generate a core file from this crash. I also find that running this script on another database (a new database created with the particular table I'm working with) didn't have this error! But after serveral modification to the function and running the script a number of times on this test database, it crashed with the same error. I did a 'vacuum' on this test db and tried to run again, the db function and trigger can be dropped and re-created a number of times before it crashes again. Seeing it works after 'vacuum' the test database, I tried to run vacuum on the development db, then tried to run the script, it failed even at its 1st attempt! Anyone has any idea?