Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost" - Mailing list pgsql-bugs

From Robert Young
Subject Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
Date
Msg-id CAJjz_NhJEMyhEjKRORzA_AbHbbYA3DY+ET8K6actRb6S_w_cfg@mail.gmail.com
Whole thread Raw
In response to Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-bugs
In reality,sometimes something would be wrong if you hard-coding 1
minute as 60 seconds.
Please read:
http://www.openbsd.org/cgi-bin/man.cgi?query=3Dstrftime
"The range of seconds is (00-60) instead of (00-59) to allow for the
periodic occurrence of leap seconds."

so,it's a bad habit including hard-coding 1 minute as 60 seconds.

On Thu, Oct 27, 2011 at 13:13, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> On 27.10.2011 15:57, Robert Young wrote:
>>
>> But,I think insistence of hard-coding should be even worse than broken
>> configuration.
>> And hard-coding should never be a good work ethics of a professional
>> programmer.
>
> You're exaggerating. There's nothing wrong hard-coding things like number=
 of
> seconds in a minute (60). While it's not as cast in stone as 60 seconds i=
n a
> minute, I don't see anything wrong with hardcoding that "localhost" means
> the local host.
>
> BTW, do we have anything in place to stop any user on the same host to se=
nd
> bogus stat messages to the stats collector?
>
> --
> =C2=A0Heikki Linnakangas
> =C2=A0EnterpriseDB =C2=A0 http://www.enterprisedb.com
>

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
Next
From: Tom Lane
Date:
Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"