Re: Async commands (like drop index)

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Async commands (like drop index)
Дата
Msg-id 1179509996.6059.8.camel@goldbach
обсуждение исходный текст
Ответ на Re: Async commands (like drop index)  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Async commands (like drop index)  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-hackers
On Fri, 2007-18-05 at 13:29 -0400, Alvaro Herrera wrote:
> I think what Joshua really wants is an equivalent of this

That's not what his original email asked for, at any rate.

> start:
>     BEGIN;
>     LOCK TABLE foo IN ACCESS EXCLUSIVE MODE NOWAIT;
>     -- if fail, rollback and go to start
>     DROP INDEX foo_idx;
>     COMMIT;
> 
> The idea is that the lock is only acquired if immediately available,
> thus not blocking other queries which would otherwise be blocked behind
> the DROP INDEX.

ISTM this can easily be implemented with statement_timeout (which is
more general to boot).

-Neil




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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Async commands (like drop index)
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Async commands (like drop index)