Re: what's going on? (was: Re: [HACKERS] createdb problem)

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Jeff Hoffmann <jeff(at)remapcorp(dot)com>
Cc: Lendvary Gyorgy <gyurika(at)prolan(dot)hu>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: what's going on? (was: Re: [HACKERS] createdb problem)
Date: 1998-11-25 02:13:08
Message-ID: 365B67B4.C522A36D@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> ... and i haven't been able to create a database in a secondary
> location by specifying an absolute path, only with environment
> variables (as of 6.4, it worked OK in 6.3.2, though)
> ... it seems that environment variables are the _one true way_ for
> 6.4, which is a change from 6.3.2. if that's the case, most docs
> don't reflect it, and if not, then there very well could be some bugs
> somewhere.

Yes, you are right that the default behavior has changed. Allowing
absolute path names exposes the Postgres server to security and
integrity risks (which may not be entirely alleviated by using
environment variables, but imho it does help). The old behavior is
recoverable by specifying

#define ALLOW_ABSOLUTE_DBPATHS 1

in your config.h or by specifying

CFLAGS+= -DALLOW_ABSOLUTE_DBPATHS

in your Makefile.custom.

You are also correct in that the docs don't seem to explicitly discuss
this issue though it is hinted at in the Admin Guide chapter on Disk
Management (no mention of ALLOW_ABSOLUTE_DBPATHS though). Similar words
appear in the User's Guide chapter on Database Management. I would have
guessed that I had added something at the time, but...

If you are annoyed enough by the lack of information to write some docs
then the files to modify are manage.sgml (for the UG) and start-ag.sgml
(for the AG). Patches gladly accepted :) I can give you back formatted
versions so you can see how it looks.

> ... this is really the correct way of doing things anyway, if you
> think through it a little bit.

Your solution is correct.

Regards.

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-11-25 02:27:15 Re: [HACKERS] 6.4.1 schedule (was segfault with -z option)
Previous Message Mail Delivery Subsystem 1998-11-25 01:25:26 Returned mail: User unknown