aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands/tablespace.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-06-26 15:53:13 -0400
committerRobert Haas <rhaas@postgresql.org>2015-06-26 15:53:13 -0400
commit8f15f74a44f68f9cb3a644786d3c732a5eeb237a (patch)
treeb95601c38396e998300f14ccdd91f5beaa2480fd /src/include/commands/tablespace.h
parentc66bc72e8a1318e43ea657ffa3798fa95f491650 (diff)
downloadpostgresql-8f15f74a44f68f9cb3a644786d3c732a5eeb237a.tar.gz
postgresql-8f15f74a44f68f9cb3a644786d3c732a5eeb237a.zip
Be more conservative about removing tablespace "symlinks".
Don't apply rmtree(), which will gleefully remove an entire subtree, and don't even apply unlink() unless it's symlink or a directory, the only things that we expect to find. Amit Kapila, with minor tweaks by me, per extensive discussions involving Andrew Dunstan, Fujii Masao, and Heikki Linnakangas, at least some of whom also reviewed the code.
Diffstat (limited to 'src/include/commands/tablespace.h')
-rw-r--r--src/include/commands/tablespace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h
index 86b0477335b..6b928a58a01 100644
--- a/src/include/commands/tablespace.h
+++ b/src/include/commands/tablespace.h
@@ -56,6 +56,7 @@ extern Oid get_tablespace_oid(const char *tablespacename, bool missing_ok);
extern char *get_tablespace_name(Oid spc_oid);
extern bool directory_is_empty(const char *path);
+extern void remove_tablespace_symlink(const char *linkloc);
extern void tblspc_redo(XLogReaderState *rptr);
extern void tblspc_desc(StringInfo buf, XLogReaderState *rptr);