+ sudo -u postgres psql --cluster 8.1/main -c "CREATE TABLESPACE \"user_$USER\" OWNER postgres LOCATION '$PGDIR'" template1
+fi
+
+if ! test -d $PGNEWDIR; then
+# postgres 9.1
+ mkdir -p $PGNEWDIR
+ chown postgres:postgres $PGNEWDIR
+ sudo -u postgres psql --cluster 9.1/main -c "CREATE TABLESPACE \"user_$USER\" OWNER postgres LOCATION '$PGNEWDIR'" template1