pg_worker and notify - Mailing list pgsql-general

From Olivier Chaussavoine
Subject pg_worker and notify
Date
Msg-id CAKJCXwr1YPxJfK=Zwu54QU9SVJURfe995zBrJCy_eVzEQnCphQ@mail.gmail.com
Whole thread Raw
Responses Re: pg_worker and notify  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
Applications using postgres frequently require central process serializing specific tasks. We usually implement these with external programs but the reliability of such solution depends on a complexity that require carefull monitoring.
I imagne an extension that would lauch some bg_workers waiting for notify statements like:
NOTIFY <channel> <event>;
and for each <event> catched on the <channel>, calling calling a pl/pgsql function with a single parameter <event>.
A predetermined list of bg_workers would be described in a public table in the postgres database, and red at postgres startup. I wonder how to code a bg_worker waiting for notifications on a channel. Have you any idea on such implementation?

--
Olivier Chaussavoine
openbarter.org

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Re: Multi-dimensional arrays
Next
From: Raymond O'Donnell
Date:
Subject: Re: Multi-dimensional arrays