[OT] Dilemma about OS <-> Postgres interaction

From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: Postgresql General List <pgsql-general(at)postgresql(dot)org>
Subject: [OT] Dilemma about OS <-> Postgres interaction
Date: 2004-06-17 21:34:32
Message-ID: 20040617213432.GD16357@campbell-lange.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an application, largely written in plpgsql, where messages are
dumped into an 'outbox' for sending via email or text message.

I am in a dilemma about how best to pick up these messages and send them
on to the message sending systems. At present I have looping perl
scripts which have a permanent database connection, which I run through
screen sessions on my server. Rather embarassingly whenever I upgrade my
application code (reload the database and export the latest CVS code) or
upgrade Postgres, my looping scripts die.

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.

Any sage advice? I realise this is both a beginner's quandry, and also
not particularly Postgresql specific. Apologies.

Rory
--
Rory Campbell-Lange
<rory(at)campbell-lange(dot)net>
<www.campbell-lange.net>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Allison 2004-06-17 21:41:24 test post
Previous Message Thomas F. O'Connell 2004-06-17 21:34:08 pg_dump out of shared memory