Skip to content

Commit

Permalink
Fix get_upstream_node_id failed if host= is place at the begining o…
Browse files Browse the repository at this point in the history
…f connection string (#174)
  • Loading branch information
anhpt379 authored and paunin committed Jul 13, 2018
1 parent 7fce3ef commit 0a9e7bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pgsql/bin/functions/get_upstream_node_id
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
PGPASSWORD=$REPLICATION_PASSWORD psql --username "$REPLICATION_USER" -h $CURRENT_REPLICATION_PRIMARY_HOST -p $REPLICATION_PRIMARY_PORT -d $REPLICATION_DB -tAc "SELECT $REPMGR_NODE_ID_COLUMN FROM $(get_repmgr_schema).$REPMGR_NODES_TABLE WHERE conninfo LIKE '% host=$CURRENT_REPLICATION_PRIMARY_HOST%' LIMIT 1"
PGPASSWORD=$REPLICATION_PASSWORD psql --username "$REPLICATION_USER" -h $CURRENT_REPLICATION_PRIMARY_HOST -p $REPLICATION_PRIMARY_PORT -d $REPLICATION_DB -tAc "SELECT $REPMGR_NODE_ID_COLUMN FROM $(get_repmgr_schema).$REPMGR_NODES_TABLE WHERE conninfo LIKE '%host=$CURRENT_REPLICATION_PRIMARY_HOST%' LIMIT 1"

0 comments on commit 0a9e7bd

Please sign in to comment.