Re: Clustering with minimal locking

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: Clustering with minimal locking
Дата
Msg-id 2272DCA5-9AFD-4B51-BBA0-9925E6B7F440@decibel.org
обсуждение исходный текст
Ответ на Re: Clustering with minimal locking  (Scott Ribe <scott_ribe@killerbytes.com>)
Ответы Re: Clustering with minimal locking  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Список pgsql-general
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, 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



Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Giorgio Valoti
Дата:
Сообщение: Re: UTF8 encoding problem
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Error when trying to drop a tablespace