pgsql: Be more conservative about removing tablespace "symlinks".

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Be more conservative about removing tablespace "symlinks".
Date: 2015-06-26 20:02:02
Message-ID: E1Z8Zp4-0002v8-Ur@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8f15f74a44f68f9cb3a644786d3c732a5eeb237a

Modified Files
--------------
src/backend/access/transam/xlog.c | 24 ++--------
src/backend/commands/tablespace.c | 89 +++++++++++++++++++++++++++----------
src/include/commands/tablespace.h | 1 +
3 files changed, 69 insertions(+), 45 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-06-26 20:02:06 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Previous Message Peter Geoghegan 2015-06-26 19:32:38 Re: pgsql: release notes: Add entry for commit 5ea86e6e6.