Re: [PATCH] xlogreader: do not read a file block twice

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
Cc: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] xlogreader: do not read a file block twice
Date: 2019-02-14 23:06:16
Message-ID: 20190214230616.GA2240@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 14, 2019 at 11:20:56AM +0300, Arthur Zakirov wrote:
> So we read whole page with size XLOG_BLCKSZ. The full code:
> https://github.com/postgrespro/pg_probackup/blob/c052651b8c8864733bcabbc2660c387b792229d8/src/parsexlog.c#L1074
>
> Here is the little optimization I made. Mainly I just add a buffer to store
> previous read page:
> https://github.com/postgrespro/pg_probackup/blob/c052651b8c8864733bcabbc2660c387b792229d8/src/parsexlog.c#L1046

Thanks, I see what you have done. I cannot comment if your shortcut
is actually fully correct based on my knowledge of this code, but
things cannot be in the best conditions without having the WAL reader
handle properly the limits. So I am planning to commit what you
propose after an extra pass on it in the next couple of days or so.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-02-14 23:08:54 Re: [Suspect SPAM] Better error messages when lacking connection slots for autovacuum workers and bgworkers
Previous Message Tom Lane 2019-02-14 22:57:54 Re: Using POPCNT and other advanced bit manipulation instructions