Re: [HACKERS] Lock freeze ? in MVCC - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Lock freeze ? in MVCC
Date
Msg-id 372595FE.2F6BAC2D@krs.ru
Whole thread Raw
In response to RE: [HACKERS] Lock freeze ? in MVCC  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] Lock freeze ? in MVCC
RE: [HACKERS] Lock freeze ? in MVCC
List pgsql-hackers
Hiroshi Inoue wrote:
> 
> Now I'm suspicious about the following code in LockResolveConflicts().
> 
>          /*
>          * We can control runtime this option. Default is lockReadPriority=0
>          */
>         if (!lockReadPriority)
>         {
>                 /* ------------------------
>                  * If someone with a greater priority is waiting for the
> lock,
>                  * do not continue and share the lock, even if we can.  bjm
>                  * ------------------------

You're right Hiroshi - this must be changed:

if we already have some lock with priority X and new requested
lock has priority Y, Y <= X, then lock must be granted.

Also, I would get rid of lockReadPriority stuff...

Bruce, what do you think?

Vadim


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Lock freeze ? in MVCC
Next
From: Vadim Mikheev
Date:
Subject: Re: [INTERFACES] JDBC and waiting for commit on a locked table in6.4.2