Re: Dynamic shared memory areas

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Dynamic shared memory areas
Дата
Msg-id CAEepm=3AGXBu4VO0_QZS0+-X3A_p-PM1DDtVoM1D_Ognd0WUoA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Dynamic shared memory areas  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
On Thu, Nov 24, 2016 at 1:07 AM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> The attached patch is just for discussion only...  I need to resolve
> that contiguous_pages question and do some more testing.

As Dilip discovered, there was a problem with resource cleanup for DSA
areas created inside pre-existing DSM segments, which I've now sorted
out in the attached version.  I also updated the copyright messages,
introduced a couple of the new 'unlikely' macros in the address
decoding path, and introduced high_segment_index to avoid scanning
bigger segment arrays than is necessary sometimes.

As for contiguous_pages_dirty, I see what was missing from earlier
attempts at more subtle invalidation: we had failed to set the flag in
cases where FreePageManagerGetInternal was called during a
FreePageManagerPut operation.  What do you think about the logic in
this patch... do you see any ways for contiguous_pages to get out of
date?  There is a new assertion that contiguous_pages matches the
state of the freelists at the end of FreePageManagerGet and
FreePageManagerPut, enabled if you defined FPM_EXTRA_ASSERTS, and this
passes my random allocation pattern testing.

--
Thomas Munro
http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: confusing checkpoint_flush_after / bgwriter_flush_after
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Creating a DSA area to provide work space for parallel execution