#!/bin/bash # # This script sets up test environment for pgxc_clean. # Please note that all the prepared transactions are # partially committed or aborted. # # You should configure PGPORT and PGHOST to connect, as # well as node names for your test environment. # # Before you run this script, XC should be up and ready. # Also, this may try to drop test databases. You may need # to run CLEAN CONNECTION satement for each coordinator in # advance. # if [ $# -le 0 ] then create=no else if [ $1 = create ] then create=yes else create=no fi fi export PGPORT=20004 exprot PGHOST=localhost sourcedb=postgres if [ $create = yes ] then psql -e $sourcedb <