Re: abort()/segfault when starting postgres in inaccessible CWD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: abort()/segfault when starting postgres in inaccessible CWD
Date: 2013-10-03 17:07:37
Message-ID: 45231.1380820057@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)2ndquadrant(dot)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".

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2013-10-03 17:14:47 Re: abort()/segfault when starting postgres in inaccessible CWD
Previous Message Andres Freund 2013-10-03 16:11:39 abort()/segfault when starting postgres in inaccessible CWD