Re: pgAgent queries
От | Dave Page |
---|---|
Тема | Re: pgAgent queries |
Дата | |
Msg-id | E7F85A1B5FF8D44C8A1AF6885BC9A0E472B89F@ratbert.vale-housing.co.uk обсуждение исходный текст |
Ответ на | pgAgent queries ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | pgadmin-hackers |
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 02 March 2005 09:28 > To: Dave Page > Subject: Re: pgAgent queries > > Dave Page wrote: > > Hi Andreas, > > > > I've got a couple of questions on pgAgent if I may... > > Sure! > > > - In pgAgent.cpp, you run various queries to find and > cleanup 'orphaned' > > jobs. It's not entirely obviously what you're trying to do here, > > especially as the first query seems somewhat bogus: > > > > rc = serviceConn->ExecuteVoid( > > "INSERT INTO pga_tmp_zombies (jagpid)\n" > > "SELECT jagpid\n" > > " FROM pgadmin.pga_jobagent AG\n" > > " LEFT JOIN pg_stat_activity PA ON jagpid=procpid\n" > > " WHERE procpid IS NULL" > > ); > > > > Specifically, you're joining on procpid /and/ requiring it > to be null, > > in a case where one would assume that an orphaned job would > be one where > > jagpid is definitely not null. > > Yes, jagpid not null, but procpid, i.e. job was started on a backend > that's not there any more! > > This is yielding the same sa > SELECT * from jobagent > WHERE jagpid NOT IN (select procpid from pg_stat_activity) Ahh, yes - I totally failed to grok the fact it was a left join! > > - Second, schedule representation. The UI doesn't seem to > even remotely > > match the table def, so I assume that was basically a WIP when you > > stopped. > > Yes. Major rewrite was intended, I wasn't happy with it. > What I wanted was a sophisticated scheduling scheme as found > in backup > programs: > - repetitive in known intervals OK, that's easy. > - on certain days (weekday, monthday) Weekday is easy as weeks are all 7 days long. Monthdays start to get tricky. > - Exceptions, e.g. "run every mo/tue/wed/thu/fr, but not on > mar22 this > year". Why would you want to do that? > Do you know TapeWare? See the attached screenshot. No - but on a completely separate note, the tape drive problem on dev.pga.org has been tracked back to a, err, 'fix' in the latest linux kernel. > Well, it shouldn't be YetAnotherCron... I agree, last day of month is > really hard. Still, reporting (data warehousing) isn't too exotic. Hmm, I can think of more uses for last day of month et al. than exceptions :-(. I might need to consult with Mark some more then - his is a full featured scheduler.... Cheers, Dave
В списке pgadmin-hackers по дате отправления: