Re: BUG #5837: PQstatus() fails to report lost connection
От | Robert Haas |
---|---|
Тема | Re: BUG #5837: PQstatus() fails to report lost connection |
Дата | |
Msg-id | AANLkTimDRAO_xe4h=vL2j0rdGF3_u2uTk0OHmv2rZK+=@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #5837: PQstatus() fails to report lost connection ("Murray S. Kucherawy" <msk@cloudmark.com>) |
Список | pgsql-bugs |
On Mon, Jan 24, 2011 at 12:59 AM, Murray S. Kucherawy <msk@cloudmark.com> w= rote: > Well my other suggestion would be to assume PGRES_FATAL_ERROR always mean= s the connection needs to be reset. =A0But this blows that idea away; this = would cause a connection reset that wouldn't actually solve the problem whe= n it's an ERROR as you described. Well, actually it's the other way around: resetting the connection would *work* in the case of an ERROR, but it'd be overkill. Most of the things that can go wrong are ERROR rather than FATAL, and you just issue a ROLLBACK to balance out any BEGIN you previously issued, and then do whatever it is you want to do next. A full connection reset would be pretty expensive in this context and, as you might guess, there are a lot more things that cause ERROR than there are that cause FATAL. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-bugs по дате отправления: