Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group