On Thu, Oct 29, 2015 at 05:39:36PM +0900, Tatsuo Ishii wrote:
> > I am happy to finish it, but I am no less happy if you finish it. Which do
> > you prefer?
>
> Please go ahead and commit.
>
> > Should the back-branch commits mirror the master branch? A more-cautious
> > alternative would be
> On Tue, Oct 27, 2015 at 05:31:25PM +0900, Tatsuo Ishii wrote:
>> > 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
>> >
On Tue, Oct 27, 2015 at 05:31:25PM +0900, Tatsuo Ishii wrote:
> > 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
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
>
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
>
On Mon, Oct 26, 2015 at 09:54:03AM +0900, Tatsuo Ishii wrote:
> > Kondo's design is correct.
>
> So more proper fix looks like this?
> + /* If postmaster is listening
> on "*", "0.0.0.0" or "::", use 127.0.0.1 */
> +
> As I stated upthread, PQping("host='0.0.0.0'") is _not portable_. It works on
> GNU/Linux, which I used for that demo. It fails on OpenBSD and Windows.
>
>> I'd be inclined to suggest fixing it like this:
>>
>> /* If postmaster is listening on "*", use localhost
>>
On 10/23/15 11:10 PM, Noah Misch wrote:
> On RHEL 5 and some other "active adult" systems, "localhost" does not reach a
> listen_addresses='::' server. IPv6 is available, but "localhost" resolves to
> 127.0.0.1 only.
>
> The latest systems resolve "localhost" to both 127.0.0.1 and ::1, in which
On Thu, Oct 22, 2015 at 07:59:27PM -0700, Tom Lane wrote:
> Noah Misch writes:
> > pg_ctl reads the address from postmaster.pid, which in turn derives from
> > listen_addresses:
>
> > $ grep -E '(unix|listen)' postgresql.conf
> > listen_addresses = '0.0.0.0'
> >
Andres Freund writes:
> Perhaps we should start to emit a notice at startup if localhost doesn't
> resolve to either v4 or v6 definitions. The few environments where
> that's indeed intentionally not the case, should be fine with such a
> message at pgstat startup.
I think
Tatsuo Ishii writes:
>> The original post used only "0.0.0.0" and "::", not "localhost" or anything
>> else entailing name resolution. As I wrote above, Kondo proposed for pg_ctl
>> to use PQping("host='127.0.0.1'") in place of PQping("host='0.0.0.0'").
>> That's all.
On Thu, Oct 22, 2015 at 04:15:10PM -0700, Tom Lane wrote:
> Tatsuo Ishii writes:
> >> The original post used only "0.0.0.0" and "::", not "localhost" or anything
> >> else entailing name resolution. As I wrote above, Kondo proposed for
> >> pg_ctl
> >> to use
> The original post used only "0.0.0.0" and "::", not "localhost" or anything
> else entailing name resolution. As I wrote above, Kondo proposed for pg_ctl
> to use PQping("host='127.0.0.1'") in place of PQping("host='0.0.0.0'").
> That's all. pg_ctl would continue to use
On 2015-10-22 16:15:10 -0700, Tom Lane wrote:
> AFAICS, the only hard-wired hostname reference in pg_ctl is "localhost",
> not "127.0.0.1" (much less "0.0.0.0"). So what you're proposing doesn't
> seem to me to have anything to do with what's there. I continue to think
> that the OP's complaint
Noah Misch writes:
> On Thu, Oct 22, 2015 at 04:15:10PM -0700, Tom Lane wrote:
>> I continue to think
>> that the OP's complaint is somehow founded on a bad address obtained by
>> looking up "localhost", because where else would it've come from?
> pg_ctl reads the address from
On Mon, Oct 12, 2015 at 08:07:37PM -0400, Tom Lane wrote:
> Robert Haas writes:
> > On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch wrote:
> >> The listening side is in good shape today. This thread is about the
> >> address
> >> that pg_ctl uses in
On Mon, Oct 12, 2015 at 07:37:42PM -0400, Robert Haas wrote:
> On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch wrote:
> > On Fri, Oct 09, 2015 at 03:14:26PM -0400, Robert Haas wrote:
> >> On Thu, Oct 8, 2015 at 11:26 PM, Noah Misch wrote:
> >> >> In particular,
On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch wrote:
> On Fri, Oct 09, 2015 at 03:14:26PM -0400, Robert Haas wrote:
>> On Thu, Oct 8, 2015 at 11:26 PM, Noah Misch wrote:
>> >> In particular, magically
>> >> substituting 127.0.0.1 for 0.0.0.0 seems utterly
Robert Haas writes:
> On Fri, Oct 9, 2015 at 10:16 PM, Noah Misch wrote:
>> The listening side is in good shape today. This thread is about the address
>> that pg_ctl uses in PQping("host=..."). Listening on 0.0.0.0 is portable.
>>
On Fri, Oct 09, 2015 at 03:14:26PM -0400, Robert Haas wrote:
> On Thu, Oct 8, 2015 at 11:26 PM, Noah Misch wrote:
> >> In particular, magically
> >> substituting 127.0.0.1 for 0.0.0.0 seems utterly without principle.
> >
> > Binding a listening socket to "0.0.0.0" listens on
On Thu, Oct 8, 2015 at 11:26 PM, Noah Misch wrote:
>> In particular, magically
>> substituting 127.0.0.1 for 0.0.0.0 seems utterly without principle.
>
> Binding a listening socket to "0.0.0.0" listens on every local IPv4 address,
> and 127.0.0.1 is one of those addresses.
Tatsuo Ishii writes:
>> When pg_ctl tries to connect to postmaster, it uses "0.0.0.0" as the
>> target ip address. Unfortunately "0.0.0.0" is not a valid address on
>> Windows and it fails. Shouldn't pg_ctl translate "0.0.0.0" to
>> "127.0.0.1" in this case?
> I think this
> Tatsuo Ishii writes:
>>> When pg_ctl tries to connect to postmaster, it uses "0.0.0.0" as the
>>> target ip address. Unfortunately "0.0.0.0" is not a valid address on
>>> Windows and it fails. Shouldn't pg_ctl translate "0.0.0.0" to
>>> "127.0.0.1" in this case?
>
>> I
23 matches
Mail list logo