Re: [HACKERS] Open 6.5 items - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Open 6.5 items
Date
Msg-id 3757734A.A2456F41@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Open 6.5 items  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> >
> > Actually, all lock modes are described in mvcc.sgml
> 
> I read it, and I don't understand the last one:
> 
>         IN SHARE ROW EXCLUSIVE MODE

It allows update a table only you. If two xacts acquire
SHARE lock and than both try to update the table then one
of them will be rolled back due to deadlock condition.
SHARE ROW EXCLUSIVE mode prevents such deadlock conditions.
But in difference from EXCLUSIVE mode it allows concurrent
SELECT FOR UPDATE, which could be used by other to ensure that
some rows will not be updated during his xaction.

As I already mentioned, our lock modes (except of Access
Share/Exclusive ones) are the same as in Oracle - I found that
their lock modes are very suitable for MVCC.

LOCK TABLE is not standard statement - so being compatible
with this big boy is good, isn't it?

Vadim


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Open 6.5 items
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Open 6.5 items