Skip site navigation (1) Skip section navigation (2)

Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?

From: Jonathan Scher <js(at)oxado(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?
Date: 2007-03-02 10:34:11
Message-ID: 45E7FDA3.7080507@oxado.com (view raw or flat)
Thread:
Lists: pgsql-hackers
> That's lock upgrading, which opens you up to deadlocks. If another
> process grabs a lock after your update exclusive, you're not going to
> be able to upgrade it.
>
>   

OK I got the point.
Is it possible to create a new table-level lock mode that says "OK, now 
I'm on share level, but soon I will upgrade it to exclusive". Then it 
would be possible to allow any read-only operation, and to forbid all 
operation that would need to upgrade.
I know that there is a sx_try_upgrade function on freeBSD kernel (man 
sx), so I guess there is a way to do it, isn't it?

Regards,
Jonathan Scher

In response to

pgsql-hackers by date

Next:From: Vishal AroraDate: 2007-03-02 10:48:10
Subject: Re: xlogViewer / xlogdump
Previous:From: Vishal AroraDate: 2007-03-02 08:54:07
Subject: xlogViewer / xlogdump

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group