>> 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, but that's your fault,
not Postgres.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
No comments:
Post a Comment