Re: Performance question

Поиск
Список
Период
Сортировка
От Anil Menon
Тема Re: Performance question
Дата
Msg-id CAHzbRKecduY-_YpUHur8p2wWW4XBvsP_4eLkVn7fiEKvbmMXbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance question  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
Thanks Laurenz, very good point!

Luckily (phew!) the business scenario is such that race conditions cannot occur (and the transaction table is append only). There is business workflow to address duplicates but
1) it occurs extremely rarely (it would be a deliberate sabotage if it occurs)
2) there is no impact on business

Yours
Anil



On Fri, Nov 21, 2014 at 5:16 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Anil Menon wrote:
> I would like to ask from your experience which would be the best "generic" method for checking if row
> sets of a certain condition exists in a PLPGSQL function.
>
> I know of 4 methods so far (please feel free to add if I missed out any others)
[...]

Are you aware that all of these methods have a race condition unless
you use isolation level READ STABILITY or better?

It may be that rows are added or removed between the check and the
corresponding action.

Yours,
Laurenz Albe

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

Предыдущее
От: zach cruise
Дата:
Сообщение: Re: better architecture?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: better architecture?