Re: RFC: pgAgent Scheduler Design
От | Andreas Pflug |
---|---|
Тема | Re: RFC: pgAgent Scheduler Design |
Дата | |
Msg-id | 4231F1B4.2030803@pse-consulting.de обсуждение исходный текст |
Ответ на | Re: RFC: pgAgent Scheduler Design ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | pgadmin-hackers |
Dave Page wrote: > > > >>-----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 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... You do. int rc=serviceConn->ExecuteVoid( "UPDATE ... SET jobagentpid=pg_backend_pid() ... WHERE jobagentid IS NULL ..."); if (rc == 1) // i.e. if exactly one row was affected, it's our job now. Regards, Andreas
В списке pgadmin-hackers по дате отправления: