Re: dirty read from plpgsql

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: dirty read from plpgsql
Дата
Msg-id 20110706123615.GA32432@depesz.com
обсуждение исходный текст
Ответ на dirty read from plpgsql  (Willy-Bas Loos <willybas@gmail.com>)
Ответы Re: dirty read from plpgsql  (Willy-Bas Loos <willybas@gmail.com>)
Список 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/

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: dirty read from plpgsql
Следующее
От: BangarRaju Vadapalli
Дата:
Сообщение: Performance Monitoring of PostGRE