Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Дата
Msg-id CAB7nPqShY5XdW5CrDxsN5OUag+zb+TM-J4nYpMjisa+hQbLaCw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
On Tue, May 17, 2016 at 6:01 AM, Teodor Sigaev <teodor@sigaev.ru> wrote:
> Correctly align page's images in generic wal API
>
> Page image should be MAXALIGN'ed because existing code could directly align
> pointers in page instead of align offset from beginning of page.
>
> Found during play with indexes as extenstion, Alexander Korotkov and me

Instead of allocating this memory unconditionally for each buffer,
wouldn't it be better to set all the page pointers to NULL in
GenericXLogStart and allocate memory only once a buffer is registered
in GenericXLogRegisterBuffer when finding a free slot? This patch is
wasting many cycles.
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_upgrade fails in 9.6 beta1
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API