From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve server code to read files as part of a base backup.
Date: Wed, 17 Jun 2020 15:45:14 +0000
Message-ID: <E1jlaFW-0003kQ-GS@gemulon.postgresql.org> (raw)
Improve server code to read files as part of a base backup.
Don't use fread(), since that doesn't necessarily set errno. We could
use read() instead, but it's even better to use pg_pread(), which
allows us to avoid some extra calls to seek to the desired location in
the file.
Also, advertise a wait event while reading from a file, as we do for
most other places where we're reading data from files.
Patch by me, reviewed by Hamid Akhtar.
Discussion: http://postgr.es/m/CA+TgmobBw-3573vMosGj06r72ajHsYeKtksT_oTxH8XvTL7DxA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2fd2effc50824a8775a088435a13f47b7a6f3b94
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 4 +
src/backend/postmaster/pgstat.c | 3 +
src/backend/replication/basebackup.c | 143 +++++++++++++++++++----------------
src/include/pgstat.h | 3 +-
4 files changed, 86 insertions(+), 67 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: rhaas@postgresql.org
Subject: Re: pgsql: Improve server code to read files as part of a base backup.
In-Reply-To: <E1jlaFW-0003kQ-GS@gemulon.postgresql.org>
References: <E1jlaFW-0003kQ-GS@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