Re: Issue enabling track_counts to launch autovacuum in 9.4.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Derek Elder <dereke(at)mirthcorp(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Issue enabling track_counts to launch autovacuum in 9.4.5
Date: 2016-03-02 22:49:31
Message-ID: 32523.1456958971@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Derek Elder <dereke(at)mirthcorp(dot)com> writes:
> That was indeed the root cause. The /etc/hosts file on the server had
> incorrect permissions which caused localhost to not resolve.

It strikes me that this should not have been so hard to solve. The
stats collector was trying to tell you what was wrong, but evidently
you could not interpret those messages correctly. I am thinking that
we need to do some work on the message wording; or maybe there is one
more message that needs to be emitted so you can follow the causal
chain?

In particular, perhaps it wasn't immediately obvious that the first
of these messages was the cause of the second:

> 2016-03-02 14:58:09 EST [14366]: [8-1] LOG: could not resolve "localhost": Name or service not known
> 2016-03-02 14:58:09 EST [14366]: [9-1] LOG: disabling statistics collector for lack of working socket

in which case maybe we could rephrase the first message along the
lines of "could not resolve "localhost" to establish statistics
collector socket: <strerror detail here>". (There are a few other
messages in the same area that would need to be changed similarly.)

Or maybe the problem was that when we forced track_counts off because of
no stats collector, we didn't emit any bleat noting that, which if we had
might have led you to realize that the above messages were the direct
cause of the next one:

> 2016-03-02 14:58:09 EST [14366]: [10-1] WARNING: autovacuum not started because of misconfiguration
> 2016-03-02 14:58:09 EST [14366]: [11-1] HINT: Enable the "track_counts" option.

Or both changes, or something else entirely?

I'd be interested to hear how you perceived these log messages and
what you think might help the next person.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message avi Singh 2016-03-02 23:03:06 Postgresql upgrade 9.5
Previous Message Derek Elder 2016-03-02 22:33:15 Re: Issue enabling track_counts to launch autovacuum in 9.4.5