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

From Teodor Sigaev
Subject Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Date
Msg-id 573A450D.6090607@sigaev.ru
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 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.


GenericXLogRegisterBuffer() could be called in another MemoryContext what
can be a reason for strange bugs. Right now only a few pages could be
involved in one round of GenericWal. I don't believe that such allocation
could be a reason of noticable performance degradation. Although I didn't
check that.
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Next
From: David Fetter
Date:
Subject: A Modest Upgrade Proposal