Re: LOCK for non-tables

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, "fgp(at)phlo(dot)org" <fgp(at)phlo(dot)org>, "simon(at)2ndquadrant(dot)com" <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LOCK for non-tables
Date: 2011-01-14 19:54:12
Message-ID: 1B131979-EB62-472F-B1F7-C3F6C41D76D1@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 14 janv. 2011 à 20:08, Robert Haas <robertmhaas(at)gmail(dot)com> a écrit :

> On Fri, Jan 14, 2011 at 1:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> So it looks to me like there are at least two fixes other than the ones
>> you enumerated:
>>
>> 1. Make NOWAIT a reserved word. Not good, but perhaps better than
>> reserving all the different object type names.
>>
>> 2. Disallow the above abbreviated syntax; allow NOWAIT only after an
>> explicit IN ... MODE phrase. This would probably break a couple of
>> applications, but I bet a lot fewer than changing the longer-established
>> parts of the command syntax would break.
>>
>> I think #2 might be the best choice here.

+1

>
> That strikes me as pretty unintuitive. I'd rather take the hit of
> forcing people to write "LOCK TABLE foo" instead of just "LOCK foo"
> than try to explain why they have to include "IN ACCESS EXCLUSIVE
> MODE" if they want to stick "NOWAIT" on the end. However, I guess
> it's a matter of opinion so... anyone else have an opinion?

Since you ask, see above. :)

--
dim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-01-14 19:56:57 Re: LOCK for non-tables
Previous Message Tom Lane 2011-01-14 19:51:03 Re: limiting hint bit I/O