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