Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

postgres does not know where to find the server configuration file #21920

Closed
mxcl opened this issue Aug 15, 2013 · 8 comments
Closed

postgres does not know where to find the server configuration file #21920

mxcl opened this issue Aug 15, 2013 · 8 comments
Assignees

Comments

@mxcl
Copy link
Contributor

mxcl commented Aug 15, 2013

Posting for discussion.

Surely, surely, we should have this default to something?

$ postgres
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
@ghost ghost assigned mxcl Aug 15, 2013
@mxcl
Copy link
Contributor Author

mxcl commented Aug 15, 2013

At least we should configure postgres to have a default place that it looks for its configuration.

@MikeMcQuaid
Copy link
Member

Agreed.

@mxcl
Copy link
Contributor Author

mxcl commented Aug 15, 2013

Possibly this is what is required: --sysconfdir=#{HOMEBREW_PREFIX}/etc/postgres

@adamv
Copy link
Contributor

adamv commented Aug 30, 2013

Did that work?

@BlakeGardner
Copy link

I tried recompiling with that option and it was a no-go. After asking around in IRC and reading the documents i was told that there's no way to compile in a default server configuration file.

@nandub
Copy link
Contributor

nandub commented Aug 30, 2013

You can add this to the caveat on the formula to specify location of server configuration
export PGDATA=/usr/local/var/postgres

@mxcl
Copy link
Contributor Author

mxcl commented Sep 5, 2013

I guess the caveat is the best we can do then. Thanks for asking around @BlakeGardner.

@mxcl mxcl closed this as completed in e3ac215 Sep 5, 2013
@petere
Copy link
Contributor

petere commented Sep 6, 2013

Normally you would install an init script or equivalent that encodes the location of the data directory.

handyman5 pushed a commit to handyman5/homebrew that referenced this issue Oct 7, 2013
As a PostgreSQL n00b, this is the information I wanted.

Ideally we’d set a default configuration location for postgres to look, however apparently, this is not possible.

Side note: it's about time we split caveats out. One of these is advise for failed builds, and I just added usage. Usage is hardly caveats, but generally usage is cool and we should encourage it as a separate section, and encourage people to add links perhaps.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants