Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)
Дата
Msg-id CA+Tgmoap8ZtdQSRB0KHJds0AeFe6hCse8oBvTVCqt=iqDg7X=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Removing freelist (was Re: Should I implement DROP INDEX CONCURRENTLY?)  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On Mon, Jan 23, 2012 at 12:12 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Sat, Jan 21, 2012 at 5:29 PM, Jim Nasby <jim@nasby.net> wrote:
>>> We should also look at having the freelist do something useful, instead of just dropping it completely.
Unfortunatelythat's probably more work... 
>
>> That's kinda my feeling as well.  The free list in its current form is
>> pretty much useless, but I don't think we'll save much by getting rid
>> of it, because that's just a single test.  The expensive part of what
>> we do while holding BufFreelistLock is, I think, iterating through
>> buffers taking and releasing a spinlock on each one (!).
>
> Yeah ... spinlocks that, by definition, will be uncontested.

What makes you think that they are uncontested?  Or for that matter,
that even an uncontested spinlock operation is cheap enough to do
while holding a badly contended LWLock?

> So I think
> it would be advisable to prove rather than just assume that that's a
> problem.

It's pretty trivial to prove that there is a very serious problem with
BufFreelistLock.  I'll admit I can't prove what the right fix is just
yet, and certainly measurement is warranted.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: WAL Restore process during recovery
Следующее
От: Robert Haas
Дата:
Сообщение: Re: PG-Strom - A GPU optimized asynchronous executor module