Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-08-20 Thread Pavel Stehule
Hi 2015-08-20 16:42 GMT+02:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi, > > > Job schedulers are important and sometimes very complex part of any > > software. PostgreSQL miss it. I propose new contrib module, that can be > > used simply for some tasks, and that can be used as base for othe

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-08-20 Thread Alvaro Herrera
Pavel Stehule wrote: Hi, > Job schedulers are important and sometimes very complex part of any > software. PostgreSQL miss it. I propose new contrib module, that can be > used simply for some tasks, and that can be used as base for other more > richer schedulers. I prefer minimalist design - but

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-14 Thread Pavel Stehule
2015-05-14 19:12 GMT+02:00 Jim Nasby : > On 5/14/15 1:36 AM, Pavel Stehule wrote: > >> I don't think we want to log statements, but we should be able to >> log when a job has run and whether it succeeded or not. (log in a >> table, not just a logfile). >> >> This isn't something th

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-14 Thread Jim Nasby
On 5/14/15 1:36 AM, Pavel Stehule wrote: I don't think we want to log statements, but we should be able to log when a job has run and whether it succeeded or not. (log in a table, not just a logfile). This isn't something that can be done at higher layers either; only the sch

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-13 Thread Pavel Stehule
2015-05-14 8:01 GMT+02:00 Jim Nasby : > On 5/13/15 1:32 AM, Pavel Stehule wrote: > >> 5. When command waits to free worker, write to log >> 6. When command was not be executed due missing workers (and >> max_workers >> > 0), write to log >> >> >> Also unfortun

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-13 Thread Jim Nasby
On 5/13/15 1:32 AM, Pavel Stehule wrote: 5. When command waits to free worker, write to log 6. When command was not be executed due missing workers (and max_workers > 0), write to log Also unfortunate. We already don't provide enough monitoring capabili

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Pavel Stehule
2015-05-13 7:50 GMT+02:00 Jim Nasby : > On 5/12/15 11:32 PM, Pavel Stehule wrote: > >> I would not to store state on this level - so "at" should be >> implemented on higher level. There is very high number of >> possible strategies, what can be done with failed tasks - and

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Jim Nasby
On 5/12/15 11:32 PM, Pavel Stehule wrote: I would not to store state on this level - so "at" should be implemented on higher level. There is very high number of possible strategies, what can be done with failed tasks - and I would not to open this topic. I believe

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Pavel Stehule
2015-05-13 4:08 GMT+02:00 Craig Ringer : > > > On 13 May 2015 at 00:31, Pavel Stehule wrote: > >> >> >> 2015-05-12 11:27 GMT+02:00 hubert depesz lubaczewski : >> >>> On Tue, May 12, 2015 at 09:25:50AM +0200, Pavel Stehule wrote: >>> > create type scheduled_time as (second int[], minute int[], hou

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Craig Ringer
On 13 May 2015 at 00:31, Pavel Stehule wrote: > > > 2015-05-12 11:27 GMT+02:00 hubert depesz lubaczewski : > >> On Tue, May 12, 2015 at 09:25:50AM +0200, Pavel Stehule wrote: >> > create type scheduled_time as (second int[], minute int[], hour int[], >> dow >> > int[], month int[]); >> > (,"{1,1

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Pavel Stehule
2015-05-12 11:27 GMT+02:00 hubert depesz lubaczewski : > On Tue, May 12, 2015 at 09:25:50AM +0200, Pavel Stehule wrote: > > create type scheduled_time as (second int[], minute int[], hour int[], > dow > > int[], month int[]); > > (,"{1,10,20,30,40,50}",,,) .. run every 10 minutes. > > (,"{5}",,,

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread hubert depesz lubaczewski
On Tue, May 12, 2015 at 09:25:50AM +0200, Pavel Stehule wrote: > create type scheduled_time as (second int[], minute int[], hour int[], dow > int[], month int[]); > (,"{1,10,20,30,40,50}",,,) .. run every 10 minutes. > (,"{5}",,,) .. run once per hour > Comments, notices? First, please note that

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Pavel Stehule
2015-05-12 10:45 GMT+02:00 Dave Page : > On Tue, May 12, 2015 at 10:25 AM, Pavel Stehule > wrote: > > Generic simple scheduler to contrib > > === > > Job schedulers are important and sometimes very complex part of any > > software. PostgreSQL miss it. I propose new

Re: [HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Dave Page
On Tue, May 12, 2015 at 10:25 AM, Pavel Stehule wrote: > Generic simple scheduler to contrib > === > Job schedulers are important and sometimes very complex part of any > software. PostgreSQL miss it. I propose new contrib module, that can be used > simply for some

[HACKERS] proposal: contrib module - generic command scheduler

2015-05-12 Thread Pavel Stehule
Generic simple scheduler to contrib === Job schedulers are important and sometimes very complex part of any software. PostgreSQL miss it. I propose new contrib module, that can be used simply for some tasks, and that can be used as base for other more richer schedule