Re: Changing default ../data/ directory - Mailing list pgsql-general

From Jeff Janes
Subject Re: Changing default ../data/ directory
Date
Msg-id CAMkU=1xd1PP=8yBg0e5ZAQ+KO_tJP=yv=6eMitA8yGAwJ4TCQQ@mail.gmail.com
Whole thread Raw
In response to Changing default ../data/ directory  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Changing default ../data/ directory
List pgsql-general
On Sat, Jan 4, 2020 at 10:20 AM Rich Shepard <rshepard@appl-ecosys.com> wrote:

The PGDATA environment variable used to be used for this (but I never did
get it satisfactorily working).

PGDATA should work fine if you always start the server directly.  But if you sudo or su to another user, they likely won't inherit your environment variables.  And if you use some kind of start-up script, they will likely override it.  How do you start and stop PostgreSQL?
 
I'm sure it's in the manual yet I'm unsure just where to start reading.

If you are using start-up scripts that come with some installation package, then the details are up to the packager.  The PostgreSQL manual is of little use in knowing what the packager decided to do.  It will describe what the pieces are, but not how they got assembled together.

Cheers,

Jeff

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Changing default ../data/ directory
Next
From: George Neuner
Date:
Subject: Re: Changing default ../data/ directory