Re: [GENERAL] moving from 6.3.2 to 6.5

Vadim Mikheev <vadim@krs.ru>

From: Vadim Mikheev <vadim@krs.ru>
To: mjnf@uevora.pt
Cc: "pgsql-general@postgreSQL.org" <pgsql-general@postgreSQL.org>
Date: 1999-08-17T01:48:51Z
Lists: pgsql-general
Mario Jorge Nunes Filipe wrote:
> 
> Hi
> 
> I have a relatively large application developed with php and postgres
> using pg 6.3.2. I read the changelog for v.6.5 and i got a little bit
> scared, but maybe i understood things in the wrong way.
> 
> In this application every "race condition" is placed in a begin->end
> block and most of them even have lock's before they're needed just mo
> make sure. If I upgrade postgres to 6.5 is there any danger that with
> the new locking mechanism my app's database starts getting corrupted or
> start's giving out the wrong type of information?

In 6.5.X LOCK TABLE without any option (without IN ... MODE)
does the same things as in prev versions: it stops _any_
(both read and write) concurrent access to locked table.
It's bad for performance of read-only transactions - 
I would recommend to use LOCK TABLE IN EXCLUSIVE MODE
to block write access (insert/update/delete/select_for_update)
in update transactions and use SERIALIZABLE mode in read-only
ones.

Vadim