Re: Non-Blocking Locks (i.e. Oracle NOWAIT)

From: Ang Chin Han <angch(at)bytecraft(dot)com(dot)my>
To: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org, jb(at)baltic-online(dot)de
Subject: Re: Non-Blocking Locks (i.e. Oracle NOWAIT)
Date: 2003-07-16 03:17:47
Message-ID: 3F14C3DB.6030501@bytecraft.com.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Christoph Haller wrote:

> PostgreSQL 7.3.2
> T1: begin; select * from foo for update;
> T2: set STATEMENT_TIMEOUT = 1000; -- milliseconds

Seems like setting it to 1 (ms) emulates the NOWAIT condition better.
Can't set it to 0, though.

> T2: select * from foo for update;
> T2: ERROR: Query was cancelled.

How picky are we in borrowing syntax and idiocyncracies (?) from other
DBs? Since we can closely emulate Oracle's behaviour on SELECT ... FOR
UPDATE NOWAIT, should we just add NOWAIT to the next (non-feature frozen
version) of postgres?

--
Linux homer 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux
10:30am up 202 days, 1:35, 6 users, load average: 5.40, 5.14, 5.05

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rudi Starcevic 2003-07-16 04:43:31 Data Warehousing
Previous Message Ramesh Kumar B 2003-07-16 01:17:55 Help Me