Skip to content

Commit a1c8955

Browse files
committed
Use shortname
1 parent de19732 commit a1c8955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/setup-replication.sh.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export PGPASSWORD=$REPLICATOR_PASSWORD
3131
gosu postgres pg_basebackup -R -h lb -D $PGDATA -U replicator -v -P --xlog-method=stream -w
3232

3333
echo "Create physical_replication_slot on server..."
34-
slot_name=$(echo {{getv "/self/host/hostname"}} | tr '-' '_')
34+
slot_name=$(echo {{getv "/self/host/hostname"}} | cut -d. -f1 | tr '-' '_')
3535
psql -h lb -c "SELECT * FROM pg_create_physical_replication_slot('${slot_name}');" -U replicator -d postgres
3636

3737
cat >> ${PGDATA}/recovery.conf <<-EOF

0 commit comments

Comments
 (0)