pgAgent sessions - Mailing list pgadmin-hackers

From Roberts, Jon
Subject pgAgent sessions
Date
Msg-id 1A6E6D554222284AB25ABE3229A927621129C0@nrtexcus702.int.asurion.com
Whole thread Raw
List pgadmin-hackers
I'm not sure if I should ask this here or the general group but I'll start
here.

I need to limit the number of concurrent running jobs using pgAgent to a
value from a table.

Thoughts:
1.  Setting on pgAgent itself to limit the number of concurrent jobs but I
don't see an option for this.
2.  Have each job update a control table with its current status and using
pg_sleep to wait until there is an available process to run.  This won't
work because each job runs as a single transaction so other sessions can't
see updates to a control table until it is too late.
3.  Create a profile in PostgreSQL like Oracle has.  Bizgres has a Resource
Queue which looks similar to an Oracle profile and I'm sure EnterpriseDB has
something like this too but I'm using PostgreSQL.  I don't see anything in
PostgreSQL which would limit the number of connections or the number of
concurrent processes a user can run.

Is there any other way to limit the number of concurrent pgAgent jobs
running at a time?


Jon

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Creating types
Next
From: Dave Page
Date:
Subject: Re: Submitting cursored query support, docs, etc