Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7D42847549F for ; Mon, 12 Aug 2002 05:22:11 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id F3CC3474E71 for ; Mon, 12 Aug 2002 05:22:10 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id DF1AE3820E7; Mon, 12 Aug 2002 05:22:09 -0400 (EDT) From: g.hintermayer@inode.at (Gerhard Hintermayer) X-Newsgroups: comp.databases.postgresql.interfaces Subject: libpgtcl modifications Date: 12 Aug 2002 02:16:35 -0700 Organization: http://groups.google.com/ Lines: 29 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-interfaces@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/28 X-Sequence-Number: 2990 Well, I hacked some files to get the following working: A broken backend connection trigers 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. I'd like to share my changes (because I don't want to apply them to every release). What's the way to go ? I'd also like to see a TclObj-based implementation, and also support for Tcl8.4, *and* I'd even be willing to implement some of these changes. Any suggestions ? Attached is the patch with the described functionality. Oops , cannot attach files with google, and my ISP does'nt have comp.databases.postgresql.interfaces :-(, what shall I do ? My ISP says, this NG is not listed in the BIG8 groups, is that correct ? Gerhard >