From: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: keeping track of function execution |
Date: | 2009-05-04 11:00:52 |
Message-ID: | gtmht4$u26$3@reversiblemaps.ath.cx |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2009-05-03, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On Sun, May 3, 2009 at 9:38 AM, Wojtek <foo(at)twine(dot)pl> wrote:
>> Hi,
>>
>> I have a question on transactions/isolation levels/etc...
>> In my PL/pgSQL function main loop goes through inventory list of active
>> devices, for each one executing processing applicable for given device,
>> like:
>> FOR i in --i is %rowtype
>> select device_id as device_id,
>> type as type
>> from devices_list
>> where active = 1
>> LOOP
>> (...)
>> -- here is CASE statement, checking value of 'type' parameter
>> (....)
>> END LOOP; --simple enough, right?
>>
>> This processing is pretty heavy and takes lot of time... so, I'd like to be
>> able to monitor as processing progresses and I need to be able to say:
>> -which devices've been processed already
>> -which ones've not been processed yet
>
> You could raise notice and then tail the logs as it runs. Or the
> other option mentioned of using dblink() works well too.
you can retrieve notices through libpq. we're experimenting with using them,
and notifies to control the business logic in applications.
From | Date | Subject | |
---|---|---|---|
Next Message | A. Kretschmer | 2009-05-04 11:10:46 | Re: Calculating product from rows - (aggregate product ) |
Previous Message | Jasen Betts | 2009-05-04 10:53:38 | Re: Calculating product from rows - (aggregate product ) |