#!/bin/sh export PGDATABASE=postgres export PGUSER=postgres # re-create database cluster pg_ctl stop -m immediate rm -rf $PGDATA initdb -U postgres # FDW for PostgreSQL requires password authentiaction on non-superuser access mv $PGDATA/pg_hba.conf $PGDATA/pg_hba.conf.org cat > $PGDATA/pg_hba.conf <