Re: RFC: pgAgent Scheduler Design - Mailing list pgadmin-hackers

From Dave Page
Subject Re: RFC: pgAgent Scheduler Design
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E472B9E3@ratbert.vale-housing.co.uk
Whole thread Raw
In response to RFC: pgAgent Scheduler Design  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: RFC: pgAgent Scheduler Design
List pgadmin-hackers

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 08 March 2005 18:28
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] RFC: pgAgent Scheduler Design
>
> Dave Page wrote:
>
> >
> >>obs (shell jobs) need a system qualifier.
> >>
> >>
> >
> >Well that would tie in with the multi-thread model, and the
> current code
> >which is broken with multiple agents anyway (because there
> is nothing to
> >stop 2 agents grabbing and running the same job at the same time).
> >
> >
>
> AFAIR there *is* a locking, by updating the column "current
> agent pid".

Which isn't done in the same transaction as the original select, thus
allowing a window in which another agent might grab the same job and
execute it (though from my reading of the code, the second instance
won't bother to log it's start time, and will probably mess up the
logging of step results because prtid will be an empty string). Unless
I'm missing something of course...

/D

pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: RFC: pgAgent Scheduler Design
Next
From: "Dave Page"
Date:
Subject: Re: RFC: pgAgent Scheduler Design