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

2016-05-17 Thread Tom Lane
Teodor Sigaev writes: >> 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

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

2016-05-16 Thread Teodor Sigaev
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. Generi