]> granicus.if.org Git - postgresql/commit
Be more conservative about removing tablespace "symlinks".
authorRobert Haas <rhaas@postgresql.org>
Fri, 26 Jun 2015 19:53:13 +0000 (15:53 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 26 Jun 2015 19:53:13 +0000 (15:53 -0400)
commit8f15f74a44f68f9cb3a644786d3c732a5eeb237a
treeb95601c38396e998300f14ccdd91f5beaa2480fd
parentc66bc72e8a1318e43ea657ffa3798fa95f491650
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.
src/backend/access/transam/xlog.c
src/backend/commands/tablespace.c
src/include/commands/tablespace.h