--- reproduce-bug-tblspace.sh	2017-04-06 13:49:10.657803383 +0900
+++ reproduce-bug-tblspace.sh.new	2017-04-06 13:48:45.870024586 +0900
@@ -48,3 +48,14 @@
 echo "************************ SECOND BASEBACKUP ************************"
-echo "Expecting it to fail with 'directory \"/tmp/pg_bug_backup_tblspace/dest_server/tblspc\" exists but is not empty'"
+
+echo "stashing tablespace directories of the first backup"
+cd ..
+mv tblspc tblspc.tmp
+mkdir tblspc
+cd datas
+
 $PG2/pg_basebackup -h /tmp -p $PORT2 -D pg2 --tablespace-mapping=/tmp/pg_bug_backup_tblspace/source_server/tblspc=/tmp/pg_bug_backup_tblspace/dest_server/tblspc
+
+echo "merging tablespace directories"
+cd ..
+mv tblspc.tmp/* tblspc/
+rmdir tblspc.tmp
