Re: Online index builds

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Online index builds
Дата
Msg-id 27656.1165966837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Online index builds  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Online index builds
Список pgsql-general
Jeff Davis <pgsql@j-davis.com> writes:
> My point was that, because we can run it in multiple transactions, can't
> we drop the nonexclusive lock before acquiring the exclusive lock,

No.  What happens if someone renames the table out from under you, to
mention just one possibility?  If you've been holding nonexclusive lock
for a long time (as you would've been) there's a nontrivial chance that
someone is already queued up for an exclusive lock and will get in
before you do.

            regards, tom lane

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