Re: Performance question

From: Anil Menon <gakmenon(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance question
Date: 2014-11-21 10:32:40
Message-ID: CAHzbRKecduY-_YpUHur8p2wWW4XBvsP_4eLkVn7fiEKvbmMXbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)albe(at)wien(dot)gv(dot)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
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Pribyl 2014-11-21 14:13:50 Detecting master/slave
Previous Message Albe Laurenz 2014-11-21 09:16:40 Re: Performance question