----- Original Message -----
From: "Andy Kriger" <akriger@greaterthanone.com>
To: "Pgsql-General" <pgsql-general@postgresql.org>
Sent: Monday, December 30, 2002 6:07 PM
Subject: Re: [GENERAL] lock table question
> I agree which is why I'm asking the question. In this case, I'm trying to
> ensure that my inventory quantity is not changed by some other request as
> the first one does a test of availability and then decrements that
> availability.
>
> After various responses, it looks like SELECT...FOR UPDATE does fit the bill
> if I use it consistently for querying the records I'm interested in.
>
> I'm no psql expert, so every day it's something new to add to my toolkit.
> -a
I've found Tom Lane's presentation on concurrency issues a must read:
http://conferences.oreillynet.com/cs/os2002/view/e_sess/2681
It's in a PDF file archived in the .tgz file at the end of the article.
HTH,
Mike Mascari
mascarm@mascari.com
> ----
>
> Why?
>
> You're really swimming upstream against the notion of MVCC if you want
> to prevent pure readers from proceeding while your update transaction
> runs. Since you claim to be concerned about bottlenecks, I do not see
> why you shouldn't embrace the MVCC worldview, rather than fighting it
> tooth and nail.
>
> regards, tom lane