Re: [HACKERS] Dynamic shared memory areas

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [HACKERS] Dynamic shared memory areas
Дата
Msg-id CAM3SWZRzf7+7W=Gb6D4hWe54Vp6YcbkqXK4jz62znSfgC=jZNg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Dynamic shared memory areas  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, Nov 15, 2016 at 5:31 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I think we should develop versions of this that (1) allocate from the
> main shared memory segment and (2) allocate from backend-private
> memory.  Per my previous benchmarking results, allocating from
> backend-private memory would be a substantial win for tuplesort.c
> because this allocator is substantially more memory-efficient for
> large memory contexts than aset.c, and Tomas Vondra tested it out and
> found that it is also faster for logical decoding than the approach he
> proposed.

The approach that I'd prefer to take with tuplesort.c is to have a
buffer for caller tuples that is written to sequentially, and
repalloc()'d as needed, much like the memtuples array. It would be
slightly tricky to make this work when memtuples needs to be a heap
(I'm mostly thinking of top-N heapsorts here). That has perhaps
unbeatable efficiency, while also helping cases with significant
physical/logical correlation in their input, which is pretty common.
Creating an index on a serial PK within pg_restore would probably get
notably faster if we went this way.

-- 
Peter Geoghegan



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Logical Replication WIP
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] An isolation test for SERIALIZABLE READ ONLY DEFERRABLE