pgAgent sessions

From: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: pgAgent sessions
Date: 2007-12-11 18:44:36
Message-ID: 1A6E6D554222284AB25ABE3229A927621129C0@nrtexcus702.int.asurion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2007-12-11 19:29:59 Re: Submitting cursored query support, docs, etc
Previous Message Guillaume Lelarge 2007-12-11 18:21:09 Re: Creating types