Re: table locks

From: "Ilja Golshtein" <ilejn(at)yandex(dot)ru>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-general(at)postgresql(dot)org
Subject: Re: table locks
Date: 2006-12-26 07:51:40
Message-ID: 4590D48C.000003.13554@camay.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vinayakr 2006-12-26 10:36:14 DB problem
Previous Message Tom Lane 2006-12-26 07:04:43 Re: table locks