Re: Fast DSM segments

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Fast DSM segments
Дата
Msg-id CA+hUKGKc5NZDnp2iov70N32gbWNjTo1y42wC=gp=mwkaYFungA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fast DSM segments  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Fast DSM segments  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Thu, Jun 11, 2020 at 5:37 AM Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Jun 9, 2020 at 6:03 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > That all makes sense.  Now I'm wondering if I should use exactly that
> > word in the GUC... dynamic_shared_memory_preallocate?
>
> I tend to prefer verb-object rather than object-verb word ordering,
> because that's how English normally works, but I realize this is not a
> unanimous view.

It's pretty much just me and Yoda against all the rest of you, so
let's try preallocate_dynamic_shared_memory.  I guess it could also be
min_dynamic_shared_memory to drop the verb.  Other ideas welcome.

> It's a little strange because the fact of preallocating it makes it
> not dynamic any more. I don't know what to do about that.

Well, it's not dynamic at the operating system level, but it's still
dynamic in the sense that PostgreSQL code can get some and give it
back, and there's no change from the point of view of any DSM client
code.

Admittedly, the shared memory architecture is a bit confusing.  We
have main shared memory, DSM memory, DSA memory that is inside main
shared memory with extra DSMs as required, DSA memory that is inside a
DSM and creates extra DSMs as required, and with this patch also DSMs
that are inside main shared memory.  Not to mention palloc and
MemoryContexts and all that.  As you probably remember I once managed
to give an internal presentation at EDB for one hour of solid talking
about all the different kinds of allocators and what they're good for.
It was like a Möbius slide deck already.

Here's a version that adds some documentation.

Вложения

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Review for GetWALAvailability()
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: min_safe_lsn column in pg_replication_slots view