Re: [PATCH] xlogreader: do not read a file block twice - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] xlogreader: do not read a file block twice
Date
Msg-id 20190214230616.GA2240@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] xlogreader: do not read a file block twice  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Responses Re: [PATCH] xlogreader: do not read a file block twice  (Michael Paquier <michael@paquier.xyz>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using POPCNT and other advanced bit manipulation instructions
Next
From: Michael Paquier
Date:
Subject: Re: [Suspect SPAM] Better error messages when lacking connectionslots for autovacuum workers and bgworkers