Re: Extent Locks

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Extent Locks
Дата
Msg-id 51A44062.6080809@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Extent Locks  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Extent Locks
Список pgsql-hackers
On 05/17/2013 11:38 AM, Robert Haas wrote:
> maybe with a bit of modest pre-extension.
When it comes to pre-extension, is it realistic to get a count of
backends waiting on the lock and extend the relation by (say) 2x the
number of waiting backends?

Getting a list of lock waiters is always a racey proposition, but in
this case we don't need an accurate count, only an estimate, and the
count can only grow between getting the count and completing the
relation extension. Assuming it's even remotely feasible to get a count
of lock waiters at all.

If there are lots of procs waiting to extend the relation a fair chunk
could be preallocated with posix_fallocate on supported platforms.

If it's possible this would avoid the need to attempt any
recency-of-last-extension based preallocation with the associated
problem of how to store and access the last-extended time efficiently,
while still hopefully reducing contention on the relation extension lock
and without delaying the backend doing the extension too much more.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services




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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: commit fest schedule for 9.4
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Extent Locks