Re: proposal: contrib module - generic command scheduler

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, hubert depesz lubaczewski <depesz(at)depesz(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: contrib module - generic command scheduler
Date: 2015-05-14 06:36:28
Message-ID: CAFj8pRDiwmu6n=5ShKfpZk7SPY54apR+S-uoWbuT5_g9bB3-DQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-05-14 8:01 GMT+02:00 Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>:

> 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
>> capability and this just makes that worse.
>>
>>
>> theoretically it can be supported some pg_stat_ view - but I would not
>> to implement a some history table for commands. Again it is task for
>> higher layers.
>>
>
> 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
> scheduler will know if the job failed to even start, or whether it tried to
> run the job.

I don't agree - generic scheduler can run your procedure, and there you can
log start, you can run other commands and you can log result (now there is
no problem to catch any production nonfatal exception). Personally I afraid
about responsibility to maintain this log table - when and by who it should
be cleaned, who can see results, ... This is job for top end scheduler.

Regards

Pavel

>
> --
> Jim Nasby, Data Architect, Blue Treble Consulting
> Data in Trouble? Get it in Treble! http://BlueTreble.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-05-14 06:38:07 Re: Final Patch for GROUPING SETS
Previous Message Noah Misch 2015-05-14 06:32:04 Re: Final Patch for GROUPING SETS