Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmUK-0003cs-Jf for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Oct 2013 17:14:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VRmUK-0003dE-4D for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Oct 2013 17:14:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmUJ-0003d3-Fj for pgsql-bugs@postgresql.org; Thu, 03 Oct 2013 17:14:55 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmUG-0006Rv-Ao for pgsql-bugs@postgresql.org; Thu, 03 Oct 2013 17:14:54 +0000 Received: from anarazel.de (p5DDC6883.dip0.t-ipconnect.de [93.220.104.131]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MaDyS-1V83mJ2yl6-00K7pD; Thu, 03 Oct 2013 19:14:47 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 16F46101AB0; Thu, 3 Oct 2013 19:14:47 +0200 (CEST) Date: Thu, 3 Oct 2013 19:14:47 +0200 From: Andres Freund To: Tom Lane Cc: PostgreSQL Bugs Subject: Re: abort()/segfault when starting postgres in inaccessible CWD Message-ID: <20131003171447.GH19661@awork2.anarazel.de> References: <20131003161139.GA28301@awork2.anarazel.de> <45231.1380820057@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45231.1380820057@sss.pgh.pa.us> X-Provags-ID: V02:K0:8I5JcySF/9gP0Hbn96MsNe6fc3vhcjze7I2Kyujv/K4 SeCMPRqljJhjcIEu4jqXvsHOl7Z987E/nX/uW+SZjKPb6VfREc Tphs4AvJsp6eXq2p6oD1pCfmQ9aMgqI61HBt56snDBpgZ/2WYV rf20ZW5LJP7NZEEGebH8XMBFKbfn0A4LfH5FG8KZTRaFLErdPr tylEl9UL4MoiiHS0Xpms2Q+0oEhuIMJ19ZbVNWYtQ54UvGy4CT MrEH7nMc9ChRLZRC98sBV843kHtRDmVWVCFwCLxyfJBnkDmG87 2fw09yr/UGKmPNZApw8oEjQCWawu0JTEC+an7Aqn3ho/ce71NV 7uWmPYmbKji5FZm//uUNowCRoxY12qcGwbArWTcAi 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 2013-10-03 19:07:37 +0200, Tom Lane wrote: > Andres Freund writes: > > Starting postgres with a CWD that's not readable will trigger an Assert > > and if those are disabled it presumably will segfault. > > Yeah, we've discussed that before. I'm not sure it's worth fixing, > or that it could be counted on to stay fixed even if we removed the > current source(s) of trouble. > > There's a bigger problem with the scenario you show, which is that the > postmaster is started with root's environment variables not postgres'. > That's likely to lead to assorted surprises that we can't really do > anything about, even if we fixed the CWD issue. So I'm inclined to think > this scenario is a "don't do that". I have no problem not supporting the scenario of an inaccessible CWD - I'd just like to have a better error message than a segfault... > Having said that, though, it seems like a bad idea to be calling > set_pglocale_pgservice() before palloc is functional. It's not at all > obvious that that function can't be allowed to use palloc. Yes, and it seems hard to control - as proven here - that it doesn't make any calls to functions using palloc() in some edge cases. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs