Re: Performance under contention

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Re: Performance under contention
Дата
Msg-id AANLkTikGONfBBNY3DwH_8LLjNc3J+y2WunU4m6+O-J1T@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance under contention  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
On 7 December 2010 19:10, Robert Haas <robertmhaas@gmail.com> wrote:

>> I'm not very familiar with PostgreSQL code but if we're
>> brainstorming... if you're only trying to protect against a small
>> number of expensive operations (like DROP, etc.) that don't really
>> happen often, wouldn't an atomic reference counter be good enough for
>> the purpose (e.g. the expensive operations would spin-wait until the
>> counter is 0)?
>
> No, because (1) busy-waiting is only suitable for locks that will only
> be held for a short time, and an AccessShareLock on a table might be
> held while we read 10GB of data in from disk,

Generally yes, but a variant with adaptive sleeping could possibly be
used if it would be acceptable to delay (uncertainly) the already
expensive and rare operations.

> and (2) that wouldn't
> allow for deadlock detection.

Probably :)

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows
Следующее
От: Craig James
Дата:
Сообщение: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows