Re: Connection gets into state where all queries fail
От | Martijn van Oosterhout |
---|---|
Тема | Re: Connection gets into state where all queries fail |
Дата | |
Msg-id | 20040622220910.GB27296@svana.org обсуждение исходный текст |
Ответ на | Connection gets into state where all queries fail (Scott Ribe <scott_ribe@killerbytes.com>) |
Ответы |
Re: Connection gets into state where all queries fail
|
Список | pgsql-general |
On Tue, Jun 22, 2004 at 03:06:39PM -0600, Scott Ribe wrote: > OK, I'm using a pool of worker threads that each have a connection (from my > own software, no PHP or anything like that involved), and a connection is in > a state where all queries fail. Looking back through the log I find the > first entry where this connection has an error (there are successful queries > on it prior, so it's not the first query): > Your problem is that you have an error within a transaction and as the error message states: > 2004-06-21 14:51:58 [5589] ERROR: current transaction is aborted, queries > ignored until end of transaction block All your queries will be ignored until you complete the transaction, either with a commit or a rollback. I find the message very clear, how do you think it could be reworded to be more clear? > - Is there something I need to do after an error like this, in order to get > the connection back to a usable state? COMMIT or ROLLBACK > - Is this a bug? In your program, yes. Although I find it interesting that your commit is ignored after the error. Just send it as a seperate query. > - Is there anything I can do to provide more information? I still have the > server running right now, but I'm going to have to reboot soon because this > is causing problems. Just add a transaction commit or rollback after the error. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Вложения
В списке pgsql-general по дате отправления: