Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::') - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Date
Msg-id 20151027.173036.1377648315174448434.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Noah,

> No, PQping("host='127.0.0.1'") fails to reach a listen_addresses='::' server
> on many systems.  Here's what I thought Kondo was proposing:
> 
> --- a/src/bin/pg_ctl/pg_ctl.c
> +++ b/src/bin/pg_ctl/pg_ctl.c
> @@ -649,5 +649,9 @@ test_postmaster_connection(pgpid_t pm_pid, bool do_checkpoint)
>  
> -                        /* If postmaster is listening on "*", use localhost */
> +                        /* explanation here */
>                          if (strcmp(host_str, "*") == 0)
>                              strcpy(host_str, "localhost");
> +                        else if (strcmp(host_str, "0.0.0.0") == 0)
> +                            strcpy(host_str, "127.0.0.1");
> +                        else if (strcmp(host_str, "::") == 0)
> +                            strcpy(host_str, "::1");
>  

I see. Would you like to commit this?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Proposal: Trigonometric functions in degrees
Next
From: Tatsuo Ishii
Date:
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')