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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Date: 2016-05-16 21:47:16
Message-ID: CAB7nPqShY5XdW5CrDxsN5OUag+zb+TM-J4nYpMjisa+hQbLaCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, May 17, 2016 at 6:01 AM, Teodor Sigaev <teodor(at)sigaev(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2016-05-16 22:09:17 Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Previous Message Teodor Sigaev 2016-05-16 21:01:53 pgsql: Correctly align page's images in generic wal API

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2016-05-16 22:09:17 Re: [COMMITTERS] pgsql: Correctly align page's images in generic wal API
Previous Message Michael Paquier 2016-05-16 21:45:05 Re: pg_upgrade fails in 9.6 beta1