From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Willy-Bas Loos <willybas(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: dirty read from plpgsql |
Date: | 2011-07-06 12:36:15 |
Message-ID: | 20110706123615.GA32432@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 06, 2011 at 12:54:21PM +0200, Willy-Bas Loos wrote:
> I'd like to do a dirty read from plpgsql, so that i can stop the function
> that is in a long loop without rolling back the work that it did.
> All i want to read is a flag that says 'stop'.
this doesn't need dirty read.
just read committed.
make table with flags, and insert there row which says "stop". make sure
the insert gets committed.
every so often, in your function check flags in the table, and since the
change got committed - it will be visible, and function will stop.
Best regards,
depesz
--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GÜNDÜZ | 2011-07-06 13:23:50 | Re: Performance Monitoring of PostGRE |
Previous Message | Craig Ringer | 2011-07-06 11:17:11 | Re: dirty read from plpgsql |