RE: Wrong FOR UPDATE lock type

From: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
To: "'Jan Wieck'" <janwieck(at)yahoo(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Wrong FOR UPDATE lock type
Date: 2000-12-04 17:51:33
Message-ID: 8F4C99C66D04D4118F580090272A7A234D31C3@sectorbase1.sectorbase.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I'm about 99.666667% sure that the lock type choosen in the
> FOR UPDATE case (line 511 of parse_relation.c) should be
> RowExclusiveLock instead of RowShareLock. Actually I get
> "Deadlock risk" debug messages when selecting FOR UPDATE and
> then really UPDATE.

http://www.postgresql.org/users-lounge/docs/6.5/user/x3116.htm

RowShareLock
Acquired by SELECT FOR UPDATE and LOCK TABLE for IN ROW SHARE MODE
statements.

Conflicts with ExclusiveLock and AccessExclusiveLock modes.

Vadim

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-12-04 18:09:28 Re: redundancy and disk i/o
Previous Message Ross J. Reedstrom 2000-12-04 17:33:07 Re: Using Threads?