Search Postgresql Archives

Re: Clustering with minimal locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2008 at 9:26 AM, Decibel! <decibel@xxxxxxxxxxx> wrote:
On Jun 17, 2008, at 11:37 AM, Scott Ribe wrote:
BOOM! Deadlock.

No more likely than with the current cluster command. Acquiring the lock is
the same risk; but it is held for much less time.


Actually, no (at least in 8.2). CLUSTER grabs an exclusive lock before it does any work meaning that it can't deadlock by itself. Of course you could always do something like

BEGIN;
SELECT * FROM a;
CLUSTER .. ON a;
COMMIT;

Which does introduce the risk of a deadlock

Really!!? Am I missing something? How can a single transaction, running synchronous commands, deadlock itself!

Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux