Re: lock table question - Mailing list pgsql-general

From Tom Lane
Subject Re: lock table question
Date
Msg-id 23095.1041283028@sss.pgh.pa.us
Whole thread Raw
In response to Re: lock table question  ("Andy Kriger" <akriger@greaterthanone.com>)
Responses Re: lock table question  ("Andy Kriger" <akriger@greaterthanone.com>)
List pgsql-general
"Andy Kriger" <akriger@greaterthanone.com> writes:
> It doesn't lock the row from being read. I want to make sure the row cannot
> be read until I have done my read and updated if necessary.

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

pgsql-general by date:

Previous
From: "Andy Kriger"
Date:
Subject: Re: lock table question
Next
From: Manfred Koizar
Date:
Subject: Re: lock table question