Re: Auto vacuum not running -- Could not bind socket for statistics collector

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tim Schäfer <ts+ml(at)rcmd(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Auto vacuum not running -- Could not bind socket for statistics collector
Date: 2014-12-03 14:48:23
Message-ID: 547F22B7.1080000@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/03/2014 12:36 AM, Tim Schäfer wrote:
> Hi,
>
>
>> On December 2, 2014 at 4:51 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> =?UTF-8?Q?Tim_Sch=C3=A4fer?= <ts+ml(at)rcmd(dot)org> writes:
>>> After starting the server with pg_ctl start, I get the following entries in
>>> the
>>> logs:
>>
>>> 2014-12-02 15:27:36 CET LOG: could not bind socket for statistics
>>> collector: Cannot assign requested address
>>> 2014-12-02 15:27:36 CET LOG: disabling statistics collector for lack of
>>> working socket
>>
>> Yes, this will break autovacuum, because it won't have any way to find out
>> what it should vacuum. The cause probably is a DNS issue: "localhost"
>> isn't resolving to anything sensible. "dig localhost" on the command line
>> might offer some insight.
>
>
> thanks for your answer. Here is my full 'dig localhost' from the database
> server:
>
> ~/data> dig localhost
>
> ; <<>> DiG 9.9.4-rpz2.13269.14-P2 <<>> localhost
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10157
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
>
> ;; OPT PSEUDOSECTION:
> ; EDNS: version: 0, flags:; udp: 4096
> ;; QUESTION SECTION:
> ;localhost. IN A
>
> ;; ANSWER SECTION:
> localhost. 604800 IN A 127.0.0.1
>
> ;; AUTHORITY SECTION:
> localhost. 604800 IN NS localhost.
>
> ;; ADDITIONAL SECTION:
> localhost. 604800 IN AAAA ::1
>
> ;; Query time: 1 msec
> ;; SERVER: 192.168.185.11#53(192.168.185.11)
> ;; WHEN: Wed Dec 03 09:24:53 CET 2014
> ;; MSG SIZE rcvd: 96
>
>
> Looks fine to me. Or is there something wrong with it?
>
> And are you sure pgsql is unhappy with localhost? It would be great if I
> definitely knew the address it is trying to bind. Is there a way to tell?

The below after starting Postgres will show what it successfully bound
to. Not a complete answer but might help narrow the possibilities.

netstat -a | grep postgres
netstat -a | grep <port_number>

Where port_number is the one in postgresql.conf

Also you say you are using pg_ctl to start the program.

What user are you doing that as?

Also any other changes in the Connections portion of postgresql.conf.

>
> Thanks again & greetings,
>
> --
> Tim
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-12-03 14:52:25 Re: FW: getting error while running sql on mm_activealrm table
Previous Message Craig Ringer 2014-12-03 14:28:54 Re: Trying to get SSPI/JDBC working