From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove unnecessary memcpy when reading WAL record fitting on pag
Date: Mon, 19 Nov 2018 01:26:34 +0000
Message-ID: <E1gOYKg-0006Xu-D9@gemulon.postgresql.org> (raw)
Remove unnecessary memcpy when reading WAL record fitting on page
When reading a WAL record, its contents are copied into an intermediate
buffer. However, doing so is not necessary if the record fits fully
into the current page, saving one memcpy for each such record. The
allocation handling of the intermediate buffer is also now done only
when a record crosses a page boundary, shaving some extra cycles when
reading a WAL record.
Author: Andrey Lepikhov
Reviewed-by: Kyotaro Horiguchi, Heikki Linnakangas
Discussion: https://postgr.es/m/c2ea54dd-a1d3-80eb-ddbf-7e6f258e615e@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/285bd0ac4a7c0538d544c40aa725682e11cb71a9
Modified Files
--------------
src/backend/access/transam/xlog.c | 3 ---
src/backend/access/transam/xlogreader.c | 27 +++++++++++++--------------
2 files changed, 13 insertions(+), 17 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Remove unnecessary memcpy when reading WAL record fitting on pag
In-Reply-To: <E1gOYKg-0006Xu-D9@gemulon.postgresql.org>
References: <E1gOYKg-0006Xu-D9@gemulon.postgresql.org>
* 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