Re: ALLOW_ABSOLUTE_DBPATHS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Hallander <ehallander(at)tellium(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: ALLOW_ABSOLUTE_DBPATHS
Date: 2002-11-27 04:41:28
Message-ID: 14137.1038372088@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Eric Hallander <ehallander(at)tellium(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah. 2002-11-27 05:22:33 Re: pg_dump 7.3rc1 with 7.2 server.
Previous Message Tom Lane 2002-11-27 03:24:44 Re: pg_dump 7.3rc1 with 7.2 server.