View Single Post

   
  #4 (permalink)  
Old 04-12-2008, 07:30 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?

On Thu, Mar 01, 2007 at 06:23:37PM +0100, Jonathan Scher wrote:
> >Because when it drops the old copy of the table there had better not be
> >any concurrent readers.


> Then, is it possible to take a share update exclusive lock until the new
> table is ready, then an access exclusive one only in order to switch
> tables? I don't think it's already coded like that...


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.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFF5x/cIB7bNG8LQkwRArqwAKCRF/Suyuwea1o/PepZBDArlVqqfACfdKWs
wsDCbDx7FA241nQh0Phm0ig=
=ABSE
-----END PGP SIGNATURE-----

Reply With Quote