pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: abort()/segfault when starting postgres in inaccessible CWD
Date: Thu, 3 Oct 2013 19:14:47 +0200
Message-ID: <20131003171447.GH19661@awork2.anarazel.de> (raw)
In-Reply-To: <45231.1380820057@sss.pgh.pa.us>
References: <20131003161139.GA28301@awork2.anarazel.de>
	<45231.1380820057@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2013-10-03 19:07:37 +0200, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> 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



view thread (3+ messages)

Message-ID: <20131003171447.GH19661@awork2.anarazel.de>
Permalink:  ../20131003171447.GH19661@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20131003171447.GH19661@awork2.anarazel.de

 · 

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: andres@2ndquadrant.com, tgl@sss.pgh.pa.us
  Subject: Re: abort()/segfault when starting postgres in inaccessible CWD
  In-Reply-To: <20131003171447.GH19661@awork2.anarazel.de>
  References: <20131003161139.GA28301@awork2.anarazel.de> <45231.1380820057@sss.pgh.pa.us> <20131003171447.GH19661@awork2.anarazel.de>

* 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