-if ! test -d $PGDIR; then
- mkdir -p $PGDIR
- chown postgres:postgres $PGDIR
-fi
-
-sudo -u postgres psql -c "CREATE TABLESPACE user_$USER OWNER postgres LOCATION '$PGDIR'" template1
+# FIXME: This assumes the status-quo of database accounts not being
+# removed by destroy-user...
+if ! test -d $PGNEWDIR; then
+# postgres 9.1
+ mkdir -p $PGNEWDIR
+ chown postgres:postgres $PGNEWDIR
+ chmod 700 $PGNEWDIR
+ sudo -u postgres psql --cluster 9.6/main -c "CREATE TABLESPACE \"user_$USER\" OWNER postgres LOCATION '$PGNEWDIR'" template1