Re: Add bump memory context type and use it for tuplesorts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add bump memory context type and use it for tuplesorts
Дата
Msg-id 2488297.1711378392@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add bump memory context type and use it for tuplesorts  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Add bump memory context type and use it for tuplesorts  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> IMHO the idea of having a general purpose memory context and then also
> specialized memory contexts for particular allocation patterns is great,
> and we should embrace it. Adding more and more special cases into
> AllocSet seems to go directly against that idea, makes the code more
> complex, and I don't quite see how is that better or easier to use than
> having a separate BumpContext ...

I agree with this completely.  However, the current design for chunk
headers is mighty restrictive about how many kinds of contexts we can
have.  We need to open that back up.

Could we move the knowledge of exactly which context type it is out
of the per-chunk header and keep it in the block header?  This'd
require that every context type have a standardized way of finding
the block header from a chunk.  We could repurpose the existing
MemoryContextMethodID bits to allow having a small number of different
ways, perhaps.

            regards, tom lane



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Следующее
От: Pankaj Raghav
Дата:
Сообщение: Re: Large block sizes support in Linux