Re: [GENERAL] moving from 6.3.2 to 6.5 - Mailing list pgsql-general

From Vadim Mikheev
Subject Re: [GENERAL] moving from 6.3.2 to 6.5
Date
Msg-id 37B8BF83.1B7C2043@krs.ru
Whole thread Raw
In response to moving from 6.3.2 to 6.5  (Mario Jorge Nunes Filipe <mjnf@neptuno.sc.uevora.pt>)
List 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

pgsql-general by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [GENERAL] v6.5 foreign key trigger reposted with details
Next
From: Serj MD
Date:
Subject: ...