Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: noah(at)leadboat(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, kondo(at)sraoss(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Date: 2015-10-27 08:30:36
Message-ID: 20151027.173036.1377648315174448434.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tatsuo Ishii 2015-10-27 08:31:25 Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Previous Message Noah Misch 2015-10-27 07:20:24 Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2015-10-27 08:31:25 Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Previous Message Dean Rasheed 2015-10-27 08:24:11 Re: Proposal: Trigonometric functions in degrees