Hi,
another oracle -> postgreSQL migration question.
I have a database in which a job runs continuously to perform tasks that are inserted into a table in the form of records.
The current Oracle implementation is to use DBMS_JOB to start a job (to be precise, there can be multiple jobs working in parallel) that goes through the following loop:
- is there anything to do?
- Yes -> Do Tasks
- No -> 1 second sleep
- Was the EXIT command sent to me?
The question now is how do I start in PostgreSQL a background task that meets the following requirements:
- It must continue to run even if the connection in which the task was started is terminated.
- I need to be able to check if a background task exists.
- I need to be able to finish the background task without explicitly sending the EXIT command (see above) to the task.
I've already looked at the pg_background extension, but I don't think it meets either requirement 2 or requirement 3. But maybe I just didn’t look hard enough. And with regard to requirement 1, I'm not sure that's guaranteed.
Any suggestions on how this might be realized. Preferably without an external application. ☺
BR
Dirk
-- Dirk Mika Software Developer
|
mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany
|
fon +49 2202 2401-1197 dirk.mika@mikatiming.de www.mikatiming.de
|
AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika |