Re: table locks - Mailing list pgsql-general

From Ilja Golshtein
Subject Re: table locks
Date
Msg-id 4590D48C.000003.13554@camay.yandex.ru
Whole thread Raw
In response to Re: table locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: table locks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>>> Why do you want to lock at all?
>
>> It's long and sad story ;(
>
>If you don't explain what you're trying to accomplish, you're unlikely
>to get useful advice.

Tom,

I need table level locks for cooperative usage in my application.

LOCK TABLE table_name in EXCLUSIVE MODE
and
LOCK TABLE table_name in SHARED MODE
perfectly suit my needs.

The only drawback - interference with VACUUM and other system processes
with obvious performance/response time penalty.

So I need very simple thing:  locks behave exactly like EXCLUSIVE and SHARED
I can use to control my own application processes.

Honestly I've already introduced such locks with syntax
LOCK TABLE table_name in APPLICATION EXCLUSIVE MODE
and
LOCK TABLE table_name in APPLICATION SHARED MODE
Does publishing of this patch make any sense?

I can explain what is the reason of table locks usage (briefly I need this thing to provide transaction isolation).
Story is long and sad indeed, though I can retell it if it seems to be useful.

Thanks a lot for your response.

--
Best regards
Ilja Golshtein

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: table locks
Next
From: vinayakr@vmoksha.com
Date:
Subject: DB problem