Re: [OT] Dilemma about OS <-> Postgres interaction - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: [OT] Dilemma about OS <-> Postgres interaction
Date
Msg-id 20040618000755.E743@hermes.hilbert.loc
Whole thread Raw
In response to [OT] Dilemma about OS <-> Postgres interaction  (Rory Campbell-Lange <rory@campbell-lange.net>)
List pgsql-general
> I suppose I could use plperl and create a trigger to alert a system-wide
> daemon that a message was ready for sending whenever a new one dropped
> into the 'outbox', and restart the daemon if it had died. I feel
> superstitious about using an untrusted language for functions though.
Sounds like a perfect candidate for a notify/listen solution ?

Eg. send a notify from an insert trigger. In your "listen"
listener loop in the demon regularly check and re-establish
the database connection.

In GnuMed we are listening for trigger()ed notifies on
insert/delete/upgrade in our middleware cache quite
successfully.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

pgsql-general by date:

Previous
From: Ned Lilly
Date:
Subject: SCO embraces MySQL
Next
From: Edmund Bacon
Date:
Subject: Re: [OT] Dilemma about OS <-> Postgres interaction