pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eric Hallander <ehallander@tellium.com>
To: pgsql-admin@postgresql.org
Subject: ALLOW_ABSOLUTE_DBPATHS
Date: Mon, 25 Nov 2002 12:00:07 -0500
Message-ID: <3DE25717.3080009@tellium.com> (raw)

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.

Anyway, I have been using 7.2.3 on HPUX 11.0

Any thoughts?

There was a post on the 10th in the bugs discussion, 
http://archives.postgresql.org/pgsql-bugs/2002-11/msg00080.php but the 
reply seems to have an html source issue 
http://archives.postgresql.org/pgsql-bugs/2002-11/msg00067.php

I am basically having the same problem, but see in the source where the 
issue is.

Eric

static char *
resolve_alt_dbpath(const char *dbpath, Oid dboid)
{
        const char *prefix;
        char       *ret;   
        size_t          len;    

        if (dbpath == NULL || dbpath[0] == '\0')
                return NULL;

        if (strchr(dbpath, '/'))
        {       
                if (dbpath[0] != '/')
                        elog(ERROR, "Relative paths are not allowed as 
database locations");
#ifndef ALLOW_ABSOLUTE_DBPATHS
                elog(ERROR, "Absolute paths are not allowed as database 
locations");
#endif
                prefix = dbpath;
        }     
        else   
        {      
                /* must be environment variable */
                char       *var = getenv(dbpath);

                if (!var)
                        elog(ERROR, "Postmaster environment variable 
'%s' not set", dbpath);
                if (var[0] != '/')
                        elog(ERROR, "Postmaster environment variable 
'%s' must be absolute path", dbpath);
                prefix = var;
        }        




view thread (2+ messages)  latest in thread

Message-ID: <3DE25717.3080009@tellium.com>
Permalink:  ../3DE25717.3080009@tellium.com/
Also on:    postgresql.org/message-id/3DE25717.3080009@tellium.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ehallander@tellium.com
  Subject: Re: ALLOW_ABSOLUTE_DBPATHS
  In-Reply-To: <3DE25717.3080009@tellium.com>
  References: <3DE25717.3080009@tellium.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox