Re: RFC: pgAgent Scheduler Design

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>
Cc: <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: RFC: pgAgent Scheduler Design
Date: 2005-03-09 09:45:58
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E472B9E3@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)de]
> Sent: 08 March 2005 18:28
> To: Dave Page
> Cc: pgadmin-hackers(at)postgresql(dot)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

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2005-03-09 10:38:52 Re: RFC: pgAgent Scheduler Design
Previous Message Andreas Pflug 2005-03-08 18:27:46 Re: RFC: pgAgent Scheduler Design