On Fri, Jul 12, 2019 at 7:06 AM Dirk Mika <Dirk.Mika@mikatiming.de> wrote:
>
>
>
> A cron job will only run once a minute, not wake up every second.
>
>
>
> I would like to avoid external programs if possible. In the current Oracle environment, there are potentially
multipleschemas on a server in which processing can be active. And processing can be started, monitored and stopped
froma client application. And only for the schema with which the application is connected.
>
Creating a background worker that invokes a stored procedure once per
second? <https://www.postgresql.org/docs/11/bgworker.html>
But this is not so simple to put in place.
Otherwise pg_cron with a function that performs a pg_sleep of one
second in a loop.
Anyway, it seems to me you are better refactoring your solution: it
seems you need to process data when _new data_ comes, not once per
second, so it sounds to me like a trigger could solve the problem.
Luca