PrivateRefCount patch has got issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема PrivateRefCount patch has got issues
Дата
Msg-id 15028.1418772313@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: PrivateRefCount patch has got issues  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
I just happened to look into bufmgr.c for the first time in awhile, and
noticed the privaterefcount-is-no-longer-a-simple-array stuff.  It doesn't
look too well thought out to me.  In particular, PinBuffer_Locked calls
GetPrivateRefCountEntry while holding a buffer-header spinlock.  That
seems completely unacceptable.  It's certainly a huge violation of our
design principle that spinlocks should be held for only a few
instructions; and I rather suspect that a palloc failure down inside the
hashtable entry-allocation code would leave things in a bad state.  It's
also depressing that the very common code path ReleaseBuffer->UnpinBuffer
results in a double search of the array/hashtable; that should be
refactored to avoid that.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Commitfest problems
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Commitfest problems