./initdb -D ../data
echo "wal_level=logical
max_connections=100
max_wal_senders=10
log_error_verbosity = verbose
log_statement = all
client_min_messages=LOG
listen_addresses='*'
max_replication_slots=10
wal_sender_timeout = 1h
wal_buffers=1kB
wal_receiver_timeout = 1h">>../data/postgresql.conf

./initdb -D ../data3
echo "wal_level=logical
max_connections=100
max_wal_senders=10
log_error_verbosity = verbose
log_statement = all
client_min_messages=LOG
listen_addresses='*'
max_replication_slots=10
wal_sender_timeout = 1h
wal_receiver_timeout = 1h
wal_buffers=1kB
port=5434">>../data3/postgresql.conf

./pg_ctl start -D ../data -l logfile
./pg_ctl start -D ../data3 -l logfile3

./psql -p 5432 -c "create table t_page();"
./psql -p 5432 -c "create table t(a int);"
./psql -p 5432 -c "create publication pub_t for table t;"

./psql -p 5434 -c "create table t(a int);"
./psql -p 5434 -c "create subscription sub_t connection 'port=5432 user=postgres application_name=sub_t' publication pub_t;"
