pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Grigory Smolkin <g.smolkin@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] xlogreader: do not read a file block twice
Date: Fri, 15 Feb 2019 08:06:16 +0900
Message-ID: <20190214230616.GA2240@paquier.xyz> (raw)
In-Reply-To: <7eaccd53-ea89-e0cf-b718-80e3f3fc3abf@postgrespro.ru>
References: <2ddf4a32-517e-d6f4-d992-4a63b6035bfd@postgrespro.ru>
	<87e30af6-f85a-dc95-4574-95cded028786@postgrespro.ru>
	<20190212042300.GL1475@paquier.xyz>
	<1fa0c9fe-32a5-3ebd-e9c2-b5e2c9abc03e@postgrespro.ru>
	<20190214065156.GE2366@paquier.xyz>
	<7eaccd53-ea89-e0cf-b718-80e3f3fc3abf@postgrespro.ru>

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/parsex...
> 
> 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/parsex...

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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../20190214230616.GA2240@paquier.xyz/2-signature.asc)
  download

view thread (11+ messages)  latest in thread

Message-ID: <20190214230616.GA2240@paquier.xyz>
Permalink:  ../20190214230616.GA2240@paquier.xyz/
Also on:    postgresql.org/message-id/20190214230616.GA2240@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, a.zakirov@postgrespro.ru, g.smolkin@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: [PATCH] xlogreader: do not read a file block twice
  In-Reply-To: <20190214230616.GA2240@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox