Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [GENERAL] Locking & concurrency - best practices

From: Adam Rich <adam.r(at)indigodynamic.com>
Date: Mon Jan 14 2008 - 17:57:43 EST


>
> From what I can tell, this kind of roll-your-own application level
> locking system is exactly what advisory locks are for. Search the
> archives for the last couple of weeks as I remember someone posting
> some really helpful functions to assist in using advisory locks.
>
> Erik Jones

Yes & No... it depends on the lifetime of the locks you need. The new advisory locks in postgres only live for the duration of your session. The ones Andy describes will live past session end, connection end, even through database restarts. And if you're using replication or log shipping, the locks will be propagated to partner databases as well.

If you need your locks to live past session end, the advisory locks won't help you.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster Received on Mon Jan 14 18:02:20 2008

This archive was generated by hypermail 2.1.8 : Tue Jun 17 2008 - 00:12:50 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library