summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas2020-06-17 15:39:17 +0000
committerRobert Haas2020-06-17 15:39:17 +0000
commit2fd2effc50824a8775a088435a13f47b7a6f3b94 (patch)
tree6a27fc6920e57757dc10badaa410dc756cb7dee8 /src/include
parent453e0e3f0ef3202386b553719f628cef93ff95a7 (diff)
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pgstat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index c55dc1481ca..13872013823 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -913,7 +913,8 @@ typedef enum
*/
typedef enum
{
- WAIT_EVENT_BUFFILE_READ = PG_WAIT_IO,
+ WAIT_EVENT_BASEBACKUP_READ = PG_WAIT_IO,
+ WAIT_EVENT_BUFFILE_READ,
WAIT_EVENT_BUFFILE_WRITE,
WAIT_EVENT_CONTROL_FILE_READ,
WAIT_EVENT_CONTROL_FILE_SYNC,