Re: Alternate database locations - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: Alternate database locations
Date
Msg-id Pine.LNX.4.30.0106041205220.768-100000@peter.localdomain
Whole thread Raw
In response to Alternate database locations  ("Tauren Mills" <tauren@servlets.net>)
Responses Re: Alternate database locations
List pgsql-admin
Tauren Mills writes:

> I've sent this to both pgsql-general and pgsql-admin.  Please advise which
> is the proper list for this type of question.

-admin probably

> There also appears to be a way to create databases with an absolute path,
> but this is turned off by default for security reasons.  I haven't tried
> this yet, but it looks like I'd have to recompile with different settings
> for ALLOW_ABSOLUTE_DBPATHS.

> However, this page indicates that there are security risks in doing this.
> What are those risks?  If I prevent users other than the superuser
> "postgres" from being able to create and drop databases, are there any
> security risks?

No.  The risks are related to the fact that non-superusers can also be
allowed to create databases.

> Lastly, I've even tried creating a database normally, then moving it to the
> user's area and creating a symlink to it.  But this didn't seem to work.

It should, since that is what the "official" mechanisms do as well.

> * Is there an easy way to map database directories in the file system to
> database names?  The directories names in /var/lib/pgsql/data/base/ are not
> very helpful.

In 7.1 and later, there is one database per directory and the directories
are named $PGDATA/base/<oid>, where <oid> is the oid of the pg_database
entry.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-admin by date:

Previous
From: "Tauren Mills"
Date:
Subject: Alternate database locations
Next
From: Tom Lane
Date:
Subject: Re: Alternate database locations