aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-12-04 18:37:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-12-04 18:37:54 -0500
commit066bc21c0e085e2642ff25cc665c4efad3669d6f (patch)
tree027c786114bb35dad2ad7bb4af9aea5736963824 /src/include
parent561885db05d3296082ce8750805b8ec322cf9aa1 (diff)
downloadpostgresql-066bc21c0e085e2642ff25cc665c4efad3669d6f.tar.gz
postgresql-066bc21c0e085e2642ff25cc665c4efad3669d6f.zip
Simplify do_pg_start_backup's API by opening pg_tblspc internally.
do_pg_start_backup() expects its callers to pass in an open DIR pointer for the pg_tblspc directory, but there's no apparent advantage in that. It complicates the callers without adding any flexibility, and there's no robustness advantage, since we surely have to be prepared for errors during the scan of pg_tblspc anyway. In fact, by holding an extra kernel resource during operations like the preliminary checkpoint, we might be making things a fraction more failure-prone not less. Hence, remove that argument and open the directory just for the duration of the actual scan. Discussion: https://postgr.es/m/28752.1512413887@sss.pgh.pa.us
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xlog.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 8fd6010ba04..dd7d8b5e403 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -310,7 +310,7 @@ typedef enum SessionBackupState
} SessionBackupState;
extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
- TimeLineID *starttli_p, StringInfo labelfile, DIR *tblspcdir,
+ TimeLineID *starttli_p, StringInfo labelfile,
List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
bool needtblspcmapfile);
extern XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive,