postgresql/src/interfaces
Bruce Momjian b7214a877c What I have done for libpgtcl:
Everytime if I do PQconsumeInput (when the backend channel gets
readable) I check for the return value. (0 == error) and generate a
notification manually, e.g. fixed string connection_closed) and pass it to the
TCL event queue. The only other thing I had to do is to comment out removing
all pending events in PgStopNotifyEventSource whenever the connection was
unexpectedly closed (so the manually generated event will not be deleted).

A broken backend connection triggers a notify event to the client (fixed
notification string "connection_closed") so proper action can be taken to switch
to another database server etc. Remember that this is event driven. If you have
applications, that have idle database connections most of the time, you'll get
immediate feedback of a dying server. Upon connection to the server issue a
pg_notify for notify event "connection_closed" and whenever the backend crashes
(which it does do in very very rare cases) you get an event driven recovery. (of
course the Tcl-Event loop has to be processed). Issuing a notification
"connection_closed" on a still working database could be used for switching to
another db-server (which I've actually impelemented right now).

Gerhard Hintermayer
2002-08-17 12:19:31 +00:00
..
cli Another pgindent run. Fixes enum indenting, and improves #endif 2001-10-28 06:26:15 +00:00
ecpg Since we're depending on %option noyywrap in the main scanner now, 2002-07-30 16:33:08 +00:00
jdbc removed duplicate code from jdbc2 classes 2002-08-16 19:37:57 +00:00
libpgeasy Remove int16 from libpgeasy examples. Improve error reporting. 2002-06-07 16:53:40 +00:00
libpgtcl What I have done for libpgtcl: 2002-08-17 12:19:31 +00:00
libpq I'm giving a try at some TODO items. Currently it's the turn of the 2002-08-15 02:56:19 +00:00
libpq++ Assemble portability modules into libpgport library. 2002-07-27 20:10:05 +00:00
odbc Change LOCK statements to start new transaction 2002-08-09 10:04:21 +00:00
perl5 I'm giving a try at some TODO items. Currently it's the turn of the 2002-08-15 02:56:19 +00:00
python This fixes some text as well as enforces the use of "drop table cascade" 2002-08-15 03:33:36 +00:00
Makefile Recursive distclean shouldn't depend on recursive clean. Subdirectories 2001-03-09 21:50:27 +00:00