Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKbsU-0005Jq-6J for pgsql-bugs@arkaria.postgresql.org; Mon, 03 Mar 2014 23:02:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WKbsT-0002uc-Ky for pgsql-bugs@arkaria.postgresql.org; Mon, 03 Mar 2014 23:02:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKbsS-0002uL-Su for pgsql-bugs@postgresql.org; Mon, 03 Mar 2014 23:02:28 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WKbsQ-0001ww-H9 for pgsql-bugs@postgresql.org; Mon, 03 Mar 2014 23:02:28 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 80A25508DA3 for ; Tue, 4 Mar 2014 00:02:25 +0100 (CET) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com Received: from mail.gransy.com ([77.78.126.22]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id zhfXelvpFhlh for ; Tue, 4 Mar 2014 00:02:25 +0100 (CET) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: tv@fuzzy.cz) by mail.gransy.com (Postfix) with ESMTPSA id F3CD6508D99 for ; Tue, 4 Mar 2014 00:02:24 +0100 (CET) Message-ID: <531509FE.3090503@fuzzy.cz> Date: Tue, 04 Mar 2014 00:02:22 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #9416: Setting up postgresql-9.1 (9.1.12-0wheezy1) Fails Configuration References: <20140303032442.1916.18413@wrigleys.postgresql.org> <7216.1393859322@sss.pgh.pa.us> <20140303210449.GA4759@eldon.alvh.no-ip.org> <17596.1393882101@sss.pgh.pa.us> <20140303213129.GG17253@awork2.anarazel.de> In-Reply-To: <20140303213129.GG17253@awork2.anarazel.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 3.3.2014 22:31, Andres Freund wrote: > On 2014-03-03 16:28:21 -0500, Tom Lane wrote: >> Alvaro Herrera 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