pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: g.hintermayer@mail.inode.at
To: pgsql-interfaces@postgresql.org
Subject: libpgtcl modifications
Date: Thu, 08 Aug 2002 10:52:13 +0200
Message-ID: <E17cj1h-0004SY-00@e-mail.inode.at> (raw)

I hacked libpgtcl 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 ?

Attached is a patch (hope I did it right ;-) )

Gerhard
--
Gerhard Hintermayer
http://www.inode.at/g.hintermayer

Attachments:

patch-notification.gz (text/plain, 1.3K) download ‹’O=patchåXioã6ýìüŠÉÈÚª|ȗrÔRován6§³@Q†V¢l"²äP´[w‘ÿÞ’²­\Mât»@ƒÀ‘IÍpŽ÷É< ¡ìCYÀ$IåP°ô:*»•zÅ)'‚«©ð«<–L„žÏÒjÄ¿L†Òªê³;ҊÇò)F–e½|ɧ$†wÌh€ÓÚmîì6ÛP¯Õœr¹ü¢x é NkÛ»N<Ö)ÐÕxÓÙ±›õ6¨üý‡Ðï >ürr>ø|x~Ñ;9†ýlãdÁOâ:p:üÀdŸ™/y÷‚¢Šjbƒ'†³ßœßmØ¢WyPÚÛØ„ú,êïåý8‘<äL ü‘‡"ØìÀñåÑQ‰üú~4¸Œòvõ+ ïùÀU0r<ÔY“SÃ?»S.О꭫±ø\þ¯«_éÕBՂT&ˆ(˜ÇCÇ'ýÞû_ÍX,S@ɑ'!saU•ééð-iù!½y‘L…ÏÌÒ¶£Š¶FÅ„ÂÍÚeÖâm/x6kÉ䥜%[ÅØãdÐgéºÛp_ÊXåï_w²óµîºv}»‘ñµô©à VQŽ^£RÕl…9â©*ºÆ'Â2 `“ çÆÏ„úˆøRžlUô¤ÔãxRh¢·±Ý(I™Š‡ò½^Yd’;|ïô,ä1OG *Ð_CÄ,MCÄï(MC›×Hô^=n:v³é.úk=q…ó¶òV±5“EØÚRL#õÑëÏ'l9_‚N¶N‡Ò&šR«u…ì.˜<gé4’ fæ½{ãUo¶RÂÏ'GýÞÑ¡QŒð8sòQ ‘&h55¹dMüƹÑL€UzµœîëWÛqì¶ã®òÑ'LLÿŠIÄ_ê >‘‰X`̤~z¦_ÉÃ~‚Zé ò­B½ÑH¬ZªÞ:–UÒ¼V,õ !ʀ`ãd¦ø´`’¦«èmˆè0ãBN½H³ŒûQBy‚Ž Lxð(‚/ &"A¤‘§í`µ[E¸·AnËno;« âFb/ŠæÈSÍÝ=ø2•4§¢ñ#æ •‰`^P¦L@pñ€Sø¥œjœáx:³^<™ÊÛT_F_xq2‘—E26‚ñ,Õízʦ¬’éÈPW"ó¡*’.ñ 0€ÂÙÞÉ ç¿’.f󱜳óËJóÀÒIu ˜-…±%~1å±$\-éSAÃჩše€ƒž–cwÜdS™T 2/jÛò¾`QŒb`¿¹È7Æ@…[Þa5˜¨:Õao ã¨Oq4÷6Ã¤“E˜›ÑõAúao¡]gÔeå­X¤ï‹º(C-Qg—‡—‡ƒþAïÈç_…‚±bq– O«¤×Ós7ßo÷ÑÍ­7m·QËèf"¡1°‡èlT=;=kÐÑhúÕ$r®u‡ šÛø—vç¤*¦1˜KŠn£m»ÍzFŒõ³‰QF F_+Ø{«Úl`ðË]f¥Á‰¾¤ÆªuÁ²—©cÁ°s,ö™9å®¶wê€dz»R=NðÆ­´qò¤W‚Üþ£JÛjÙnk¹ï¼VtT§[5†õ#^ûÂ1zþ!´Æ…cT菦pâK¨· æî¶jæBÿ ‡ö§.àm£YÛ­9üƒ i·tfÒ>¢XƒœÁzë#^x©/=uðkqÍSç/SxcŠs…Åuùçùì1·¼ ³ú…ô„|†–2Þöð,1º½òøl{¶ï lqOÎõ¹<_}¨ÐÇlê!ßÿ¹CwTù»lÙßl¹ç»©

view thread (13+ messages)  latest in thread

Message-ID: <E17cj1h-0004SY-00@e-mail.inode.at>
Permalink:  ../E17cj1h-0004SY-00@e-mail.inode.at/
Also on:    postgresql.org/message-id/E17cj1h-0004SY-00@e-mail.inode.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: g.hintermayer@mail.inode.at
  Subject: Re: libpgtcl modifications
  In-Reply-To: <E17cj1h-0004SY-00@e-mail.inode.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox