From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Improve server code to read files as part of a base backup. |
Date: | 2020-06-17 15:45:14 |
Message-ID: | E1jlaFW-0003kQ-GS@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2020-06-17 19:47:41 | pgsql: Avoid potential spinlock in a signal handler as part of global b |
Previous Message | Robert Haas | 2020-06-17 15:08:35 | pgsql: Minor code cleanup for perform_base_backup(). |