CLUSTER locking

Поиск
Список
Период
Сортировка
Искать

CLUSTER locking

От:
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Дата:
Hi,

Is there a way the CLUSTER command can be changed to not take an 
exclusive lock on the table, and instead allow reads on the old table 
and index, just preventing writes?

Chris


Re: CLUSTER locking

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Christopher Kings-Lynne  writes:
> Is there a way the CLUSTER command can be changed to not take an 
> exclusive lock on the table,

No.  Committing the relfilenode swap would cut the knees off of any
active scan on the old file.
		regards, tom lane

Re: CLUSTER locking

От:
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Дата:
> No.  Committing the relfilenode swap would cut the knees off of any
> active scan on the old file.

Could it upgrade its lock to exclusive just before doing the swap?

Chris


Re: CLUSTER locking

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Christopher Kings-Lynne  writes:
>> No.  Committing the relfilenode swap would cut the knees off of any
>> active scan on the old file.

> Could it upgrade its lock to exclusive just before doing the swap?

That is a recipe for deadlock failures.
		regards, tom lane

FAQ