Re: AdvanceXLInsertBuffer vs. WAL segment compressibility

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Chapman Flack <chap(at)anastigmatix(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AdvanceXLInsertBuffer vs. WAL segment compressibility
Date: 2017-07-17 15:29:33
Message-ID: CAB7nPqQr1D3gjx8CmHYQREidG2eeGHzx2yQ97B3t2L99GE=+kQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 6, 2017 at 3:48 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> On 07/03/2017 06:30 PM, Chapman Flack wrote:
>> Although it's moot in the straightforward approach of re-zeroing in
>> the loop, it would still help my understanding of the system to know
>> if there is some subtlety that would have broken what I proposed
>> earlier, which was an extra flag to AdvanceXLInsertBuffer() that
>> would tell it not only to skip initializing headers, but also to
>> skip the WaitXLogInsertionsToFinish() check ... because I have
>> the entire region reserved and I hold all the writer slots
>> at that moment, it seems safe to assure AdvanceXLInsertBuffer()
>> that there are no outstanding writes to wait for.
>
> Yeah, I suppose that would work, too.

FWIW, I would rather see any optimization done in
AdvanceXLInsertBuffer() instead of seeing a second memset re-zeroing
the WAL page header after its data has been initialized by
AdvanceXLInsertBuffer() once. That's too late for 10, but you still
have time for a patch to be integrated in 11.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-07-17 15:34:45 Re: Multi column range partition table
Previous Message Robert Haas 2017-07-17 15:27:16 Re: Something for the TODO list: deprecating abstime and friends