> >
> > Keep in mind that it's not about coding in C but mostly about figuring
> > out what a sane design out to look like.
> >
>
While I can straddle the fence pretty my first reaction is that we are talking about "application" functionality that
fallsoutside what belongs in "core" PostgreSQL. I'd rather see pgAgent be improved and act as a basic implementation
while,for more complex use-cases, letting the community/marketplace provide solutions.
Even with simple use-cases you end up having a separate process continually running anyway. The main benefit to
linkingwith core would be the ability to startup that process after the server starts and shutdown the process before
theserver shutdown. That communication channel is something to consider outside this specific application and, if
done,could be used to talk with whatever designated "pgAgent"-like application the user chooses. Other applications
couldalso be communicated with in this way. Basically some form of API where in the postgres.conf file you specify
whichIP addresses and ports you wish to synchronize and which executable to launch just prior to communicating on said
port. If the startup routine succeeds that Postgres will, within reason, attempt to communicate and wait for these
externalprocess to finish before shutting down. If the external application closes it should proactively notify
Postgresthat it is doing so AND if you startup a program manually it can look for and talk with a running Postgres
instance.
David J.