Skip to content

Commit 11e34bd

Browse files
committed
1 parent d956b3e commit 11e34bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/setup-replication.sh.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ do
2121
done
2222

2323
echo "Stopping PostgreSQL..."
24-
gosu postgres pg_ctl -D "$PGDATA" -m fast -w stop
24+
pg_ctl -D "$PGDATA" -m fast -w stop
2525

2626
echo "Removing data dir..."
2727
rm -rf $PGDATA/*
2828

2929
echo "Launching pg_basebackup..."
3030
export PGPASSWORD=$REPLICATOR_PASSWORD
31-
gosu postgres pg_basebackup -R -h lb -D $PGDATA -U replicator -v -P --xlog-method=stream -w
31+
pg_basebackup -R -h lb -D $PGDATA -U replicator -v -P --xlog-method=stream -w
3232

3333
echo "Create physical_replication_slot on server..."
3434
slot_name=$(echo {{getv "/self/host/hostname"}} | cut -d. -f1 | tr '-' '_')
@@ -40,7 +40,7 @@ recovery_target_timeline = 'latest'
4040
EOF
4141

4242
echo "Starting PostgreSQL..."
43-
gosu postgres pg_ctl -D "$PGDATA" -w start
43+
pg_ctl -D "$PGDATA" -w start
4444

4545
{{else}}
4646
# master

0 commit comments

Comments
 (0)