Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmNj-0003No-Qw for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Oct 2013 17:08:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VRmNj-0002OE-3c for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Oct 2013 17:08:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmNi-0002O8-Ik for pgsql-bugs@postgresql.org; Thu, 03 Oct 2013 17:08:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRmNg-0003K4-30 for pgsql-bugs@postgresql.org; Thu, 03 Oct 2013 17:08:06 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id r93H7rcP021846; Thu, 3 Oct 2013 13:07:56 -0400 From: Tom Lane To: Andres Freund cc: PostgreSQL Bugs Subject: Re: abort()/segfault when starting postgres in inaccessible CWD In-reply-to: <20131003161139.GA28301@awork2.anarazel.de> References: <20131003161139.GA28301@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 03 Oct 2013 18:11:39 +0200" Date: Thu, 03 Oct 2013 19:07:37 +0200 Message-ID: <45231.1380820057@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 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". 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. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs