pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9416: Setting up postgresql-9.1 (9.1.12-0wheezy1) Fails Configuration
Date: Tue, 04 Mar 2014 00:02:22 +0100
Message-ID: <531509FE.3090503@fuzzy.cz> (raw)
In-Reply-To: <20140303213129.GG17253@awork2.anarazel.de>
References: <20140303032442.1916.18413@wrigleys.postgresql.org>
	<7216.1393859322@sss.pgh.pa.us>
	<CALhPh-XOb1-sz2-o_00pNZT5Q0TGUJ2e4cdhcxtgXo+w9J-yww@mail.gmail.com>
	<20140303210449.GA4759@eldon.alvh.no-ip.org>
	<17596.1393882101@sss.pgh.pa.us>
	<20140303213129.GG17253@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 3.3.2014 22:31, Andres Freund wrote:
> On 2014-03-03 16:28:21 -0500, Tom Lane wrote:
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>>> Since we have seen this kind of failure reported many times, I
>>> wonder if it'd make sense to check specifically for inability to
>>> resolve localhost, if only to save troubleshooters' time.
>>
>> Right now, you only get a failure of the pgstats subsystem, which
>> is logged. I don't think we can do much more than that unless you
>> want to make it a postmaster-refuses-to-start case, which seems
>> like not a net improvement.
> 
> I'd actually say that'd be an improvement. I've, a long time ago,
> spent several hours debugging a case of this, it's nontrivial for a 
> beginner. And a normal PG install simply won't work properly without 
> pgstat these days, so refusing to startup seems reasonable.

I'm not sure whether that'd be an improvement or not - whether it's
better to log the issue but start the database (and face the issues
later - maybe weeks or months, when the message we logged is lost). Or
fail promptly and force them to fix the actual issue.

A failure to start pgstats subsystem however means

 (a) no stats collector process, and thus no autovacuum/autoanalyze

 (b) no relpages/reltuples in pg_class or any other statistics (unless
     running analyze explicitly, which people don't due as they rely on
     autovacuum/autoanalyze)

 (c) no transaction wraparound handling (again, no autovacuum running)

So I'd probably vote for failing right away, and mentioning a working
localhost resolution as a requirement in the docs.

If that's unacceptable, maybe it'd be a good idea to modify the
functions backing pg_stat_* views to fail with ERROR, i.e.

   if (pgStatSock == PGINVALID_SOCKET)
       elog(ERROR, "statistics collector is not running");

because right now it's going to wait for 'pgstat wait timeout'.

regards
Tomas


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (11+ messages)  latest in thread

Message-ID: <531509FE.3090503@fuzzy.cz>
Permalink:  ../531509FE.3090503@fuzzy.cz/
Also on:    postgresql.org/message-id/531509FE.3090503@fuzzy.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tv@fuzzy.cz
  Subject: Re: BUG #9416: Setting up postgresql-9.1 (9.1.12-0wheezy1) Fails Configuration
  In-Reply-To: <531509FE.3090503@fuzzy.cz>
  References: <20140303032442.1916.18413@wrigleys.postgresql.org> <7216.1393859322@sss.pgh.pa.us> <CALhPh-XOb1-sz2-o_00pNZT5Q0TGUJ2e4cdhcxtgXo+w9J-yww@mail.gmail.com> <20140303210449.GA4759@eldon.alvh.no-ip.org> <17596.1393882101@sss.pgh.pa.us> <20140303213129.GG17253@awork2.anarazel.de> <531509FE.3090503@fuzzy.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox