Thread: Trigger Problems?
Hello,
I sent an e-mail to the mailing list yesterday, but then realized that I sent it using my other account, which may not be able to post to the list.
It seems that I have found myself in a little bit of trouble. I was wondering if there is anyone out there that can help me. Unfortunately, I am quite sure that I will not provide enough information to diagnose the problem, because I don't really know where to start. But, here is what I do know: Yesterday, I decided that it was time to get rid of five tables in my db that were not being used. I proceeded to drop all five tables. I then remembered that there were insert triggers on existing tables which called a function which updated the dropped tables. So then I dropped the function and the triggers. All of this seemed to be successful, but then I hit a serious problem. Any attempt to manipulate data (anything but a select) in the still existing tables which had the triggers removed from them aborts with the following error:
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#
Obviously, this is not good. I have vacuum analyzed the db and that seemed to have processed fine. If someone could point me in a good direction to figure out what is causing this, I would greatly appreciate it. I am not opposed to dropping the bad tables and restoring from backups, but I am still interested in finding out what is wrong and what I did wrong so that I don't do it again.
Thank you very much for your help!
Darrin
Ok, so I'm not sure why this is the way it is, but I figured out why the backend was failing every time I tried to change the data on the existing five tables. When I dropped the five unused tables, I assumed that the DROP function would also remove the foreign key constraint triggers that were associated with the dropped tables. But, in fact, they were left in the db. Therefore, every time any update or delete was performed on the existing tables, the constraint trigger fired and failed. I don't know if this was just my stupidity and I should have know to delete these triggers or if this is a bug. Either way, I learned something new.
Thanks,
Darrin
-----Original Message-----
From: Darrin Ladd <dladd@newfoundcomm.net>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Date: Wednesday, December 06, 2000 12:03 PM
Subject: [GENERAL] Trigger Problems?Hello,I sent an e-mail to the mailing list yesterday, but then realized that I sent it using my other account, which may not be able to post to the list.It seems that I have found myself in a little bit of trouble. I was wondering if there is anyone out there that can help me. Unfortunately, I am quite sure that I will not provide enough information to diagnose the problem, because I don't really know where to start. But, here is what I do know: Yesterday, I decided that it was time to get rid of five tables in my db that were not being used. I proceeded to drop all five tables. I then remembered that there were insert triggers on existing tables which called a function which updated the dropped tables. So then I dropped the function and the triggers. All of this seemed to be successful, but then I hit a serious problem. Any attempt to manipulate data (anything but a select) in the still existing tables which had the triggers removed from them aborts with the following error:pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#Obviously, this is not good. I have vacuum analyzed the db and that seemed to have processed fine. If someone could point me in a good direction to figure out what is causing this, I would greatly appreciate it. I am not opposed to dropping the bad tables and restoring from backups, but I am still interested in finding out what is wrong and what I did wrong so that I don't do it again.Thank you very much for your help!Darrin
On Thu, Dec 07, 2000 at 03:40:00PM -0600, some SMTP stream spewed forth: > Ok, so I'm not sure why this is the way it is, but I figured out why the backend was failing every time I tried to changethe data on the existing five tables. When I dropped the five unused tables, I assumed that the DROP function wouldalso remove the foreign key constraint triggers that were associated with the dropped tables. But, in fact, they wereleft in the db. Therefore, every time any update or delete was performed on the existing tables, the constraint triggerfired and failed. I don't know if this was just my stupidity and I should have know to delete these triggers or ifthis is a bug. Either way, I learned something new. Other than that, why would the connection die? It seems like an error would be better. gh > > Thanks, > Darrin > -----Original Message----- > From: Darrin Ladd <dladd@newfoundcomm.net> > To: pgsql-general@postgresql.org <pgsql-general@postgresql.org> > Date: Wednesday, December 06, 2000 12:03 PM > Subject: [GENERAL] Trigger Problems? > > > Hello, > > I sent an e-mail to the mailing list yesterday, but then realized that I sent it using my other account, which maynot be able to post to the list. > > It seems that I have found myself in a little bit of trouble. I was wondering if there is anyone out there that canhelp me. Unfortunately, I am quite sure that I will not provide enough information to diagnose the problem, because Idon't really know where to start. But, here is what I do know: Yesterday, I decided that it was time to get rid of fivetables in my db that were not being used. I proceeded to drop all five tables. I then remembered that there were inserttriggers on existing tables which called a function which updated the dropped tables. So then I dropped the functionand the triggers. All of this seemed to be successful, but then I hit a serious problem. Any attempt to manipulatedata (anything but a select) in the still existing tables which had the triggers removed from them aborts withthe following error: > > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed. > !# > > Obviously, this is not good. I have vacuum analyzed the db and that seemed to have processed fine. If someone couldpoint me in a good direction to figure out what is causing this, I would greatly appreciate it. I am not opposed todropping the bad tables and restoring from backups, but I am still interested in finding out what is wrong and what I didwrong so that I don't do it again. > > Thank you very much for your help! > Darrin