Go to file
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
config Assemble portability modules into libpgport library. 2002-07-27 20:10:05 +00:00
contrib Cleanup. 2002-08-17 04:06:48 +00:00
doc Improve documentation of trigger firing queue handling, cleanup. 2002-08-17 12:15:49 +00:00
src What I have done for libpgtcl: 2002-08-17 12:19:31 +00:00
COPYRIGHT Update copyright to 2002. 2002-06-20 20:29:54 +00:00
GNUmakefile.in Upgrade to Autoconf version 2.53. Replaced many custom macro 2002-03-29 17:32:55 +00:00
HISTORY New wording: 2002-03-25 21:24:08 +00:00
INSTALL Rebuild from source. 2002-01-31 00:46:26 +00:00
Makefile Restructure the key include files per recent pghackers discussion: there 2001-02-10 02:31:31 +00:00
README New edition 2001-12-19 18:53:58 +00:00
aclocal.m4 Upgrade to Autoconf version 2.53. Replaced many custom macro 2002-03-29 17:32:55 +00:00
configure Assemble portability modules into libpgport library. 2002-07-27 20:10:05 +00:00
configure.in Assemble portability modules into libpgport library. 2002-07-27 20:10:05 +00:00
register.txt Stamp 7.2 for release. 2002-02-03 21:00:09 +00:00

README

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains several language
bindings, including C, C++, Perl, Python, and Tcl, as well as drivers
for JDBC and ODBC.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
ftp://ftp.postgresql.org/pub/.  For more information look at our web
site located at http://www.postgresql.org/.