BUG #6548: NOWAIT does not work in Select statement if table is locked using "Lock " command

From: neeraj(dot)punmiya(at)securetogether(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6548: NOWAIT does not work in Select statement if table is locked using "Lock " command
Date: 2012-03-21 09:36:44
Message-ID: E1SAHyG-0002nj-Hq@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 6548
Logged by: Neeraj Punmiya
Email address: neeraj(dot)punmiya(at)securetogether(dot)com
PostgreSQL version: 9.1.3
Operating system: CentOS 6.2 , Windows 7
Description:

Steps to simulate problem
============================

Create Table Test (x integer,y integer);

Insert Into Test Values(1,100);
Insert Into Test Values(2,200);

First database session:
---------------------------
start transaction;
Lock table Test;

Second database session
-----------------------
start transaction;

Select y from Test where x=1 for update nowait;

select query waits until first session releases table lock.
Nowait does not have any effect in select statement.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message c_h_thakar 2012-03-21 12:07:43 Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous Message Alexander LAW 2012-03-20 19:50:14 Re: BUG #6510: A simple prompt is displayed using wrong charset