Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DF97A475B07 for ; Tue, 26 Nov 2002 23:41:24 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 474E5475AEC for ; Tue, 26 Nov 2002 23:41:24 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gAR4fSsX014138; Tue, 26 Nov 2002 23:41:29 -0500 (EST) To: Eric Hallander Cc: pgsql-admin@postgresql.org Subject: Re: ALLOW_ABSOLUTE_DBPATHS In-reply-to: <3DE25717.3080009@tellium.com> References: <3DE25717.3080009@tellium.com> Comments: In-reply-to Eric Hallander message dated "Mon, 25 Nov 2002 12:00:07 -0500" Date: Tue, 26 Nov 2002 23:41:28 -0500 Message-ID: <14137.1038372088@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/273 X-Sequence-Number: 6461 Eric Hallander writes: > In the following snippet from ./src/backend/commands/dbcommands.c, I > cannot see anywhere in the configuration where ALLOW_ABSOLUTE_DBPATHS > gets set, and why this wouldn't be the default anyway. I was creating > databases fine, but > it is possible that I exported PGDATA2, and used this, as I see that > this ifndef definition does not exist in the environment variable > portion of the code. The default configuration is that you MUST define an environment variable in the postmaster's environment for each intended database location, and then identify the location of a specific database by environment variable name, not actual filesystem path. There are fairly obvious security reasons for not letting database creators tell the backend to scribble on any-random-pathname, so I think this is a reasonable default. The DBA needs to be able to restrict the set of allowed database locations. In the long run we should get rid of this environment-variable-based mechanism in favor of storing the info in a proper SQL table, but until someone gets 'round to designing and coding that, I have no desire to change the current behavior. Certainly "#define ALLOW_ABSOLUTE_DBPATHS" is *dangerous*. regards, tom lane