*** a/src/bin/scripts/pg_isready.c
--- b/src/bin/scripts/pg_isready.c
***************
*** 31,36 **** main(int argc, char **argv)
--- 31,37 ----
  	const char *connect_timeout = DEFAULT_CONNECT_TIMEOUT;
  
  	const char *pghost_str = NULL;
+ 	const char *pghostaddr_str = NULL;
  	const char *pgport_str = NULL;
  
  #define PARAMS_ARRAY_SIZE	7
***************
*** 130,136 **** main(int argc, char **argv)
  	/*
  	 * Get the host and port so we can display them in our output
  	 */
! 	if (pgdbname)
  	{
  		opts = PQconninfoParse(pgdbname, &errmsg);
  		if (opts == NULL)
--- 131,140 ----
  	/*
  	 * Get the host and port so we can display them in our output
  	 */
! 	if (pgdbname &&
! 		(strncmp(pgdbname, "postgresql://", 13) == 0 ||
! 		 strncmp(pgdbname, "postgres://", 11) == 0 ||
! 		 strchr(pgdbname, '=') != NULL))
  	{
  		opts = PQconninfoParse(pgdbname, &errmsg);
  		if (opts == NULL)
***************
*** 149,156 **** main(int argc, char **argv)
  
  	for (opt = opts, def = defs; def->keyword; def++)
  	{
! 		if (strcmp(def->keyword, "hostaddr") == 0 ||
! 			strcmp(def->keyword, "host") == 0)
  		{
  			if (opt && opt->val)
  				pghost_str = opt->val;
--- 153,159 ----
  
  	for (opt = opts, def = defs; def->keyword; def++)
  	{
! 		if (strcmp(def->keyword, "host") == 0)
  		{
  			if (opt && opt->val)
  				pghost_str = opt->val;
***************
*** 161,166 **** main(int argc, char **argv)
--- 164,176 ----
  			else
  				pghost_str = DEFAULT_PGSOCKET_DIR;
  		}
+ 		else if (strcmp(def->keyword, "hostaddr") == 0)
+ 		{
+ 			if (opt && opt->val)
+ 				pghostaddr_str = opt->val;
+ 			else if (def->val)
+ 				pghostaddr_str = def->val;
+ 		}
  		else if (strcmp(def->keyword, "port") == 0)
  		{
  			if (opt && opt->val)
***************
*** 179,185 **** main(int argc, char **argv)
  
  	if (!quiet)
  	{
! 		printf("%s:%s - ", pghost_str, pgport_str);
  
  		switch (rv)
  		{
--- 189,197 ----
  
  	if (!quiet)
  	{
! 		printf("%s:%s - ",
! 			   pghostaddr_str != NULL ? pghostaddr_str : pghost_str,
! 			   pgport_str);
  
  		switch (rv)
  		{
