dbTalk Databases Forums  

[ADMIN] Configuring pg on os x lion

mailing.database.pgsql-admin mailing.database.pgsql-admin


Discuss [ADMIN] Configuring pg on os x lion in the mailing.database.pgsql-admin forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Barinov
 
Posts: n/a

Default [ADMIN] Configuring pg on os x lion - 04-27-2012 , 02:22 PM






Hi Everyone,

I am trying to get pg working on os x lion and getting some configuration errors. Wondering if anyone on this list faced these before.

I installed pg via homebrew and I get this error when trying to launch it via a local web server on my machine:*
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
So I go ahead and try to run postgres directly. When I do I get this:
larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/postgres ; exit;
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.
logout
So my thinking here is that the config files are missing. I searched for pg_hba.conf file and couldn't find it. Now I am unsure how to proceed, when Iused pg on os x Snow Leopard I could go into a ~/Library/Developer/postgresql folder and all my config files would be there. There would also be logsI could read to get a better idea of what's going. Now those seem to be missing, does anyone know where I can find them?
Thanks in advance for your help,
Andrew

Reply With Quote
  #2  
Old   
raghu ram
 
Posts: n/a

Default Re: [ADMIN] Configuring pg on os x lion - 04-27-2012 , 11:51 PM






On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov
<andy.lauerbarinov (AT) me (DOT) com>wrote:

Quote:
Hi Everyone,

I am trying to get pg working on os x lion and getting some configuration
errors. Wondering if anyone on this list faced these before.

I installed pg via homebrew and I get this error when trying to launch it
via a local web server on my machine:
could not connect to server: No such file or directory

Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

So I go ahead and try to run postgres directly. When I do I get this:

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/postgres ; exit;
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.
logout

So my thinking here is that the config files are missing. I searched for pg_hba.conf file and couldn't find it. Now I am unsure how to proceed, whenI used pg on os x Snow Leopard I could go into a ~/Library/Developer/postgresql folder and all my config files would be there. There would also be logs I could read to get a better idea of what's going. Now those seem to be missing, does anyone know where I can find them?

Thanks in advance for your help,

Andrew

Could you please share below information for troubleshooting this issue:
/usr/local/Cellar/postgresql/9.1.3/bin/pg_config

/usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D <data Directory Path>
status

--

Thanks & Regards,

Raghu Ram

EnterpriseDB: http://www.enterprisedb.com

Reply With Quote
  #3  
Old   
Andrew Barinov
 
Posts: n/a

Default Re: [ADMIN] Configuring pg on os x lion - 04-28-2012 , 02:58 PM



Hi,

Sure, here are the results from the two commands:

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/pg_config
BINDIR = /usr/local/Cellar/postgresql/9.1.3/bin
DOCDIR = /usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql
HTMLDIR = /usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql
INCLUDEDIR = /usr/local/Cellar/postgresql/9.1.3/include
PKGINCLUDEDIR = /usr/local/Cellar/postgresql/9.1.3/include
INCLUDEDIR-SERVER = /usr/local/Cellar/postgresql/9.1.3/include/server
LIBDIR = /usr/local/Cellar/postgresql/9.1.3/lib
PKGLIBDIR = /usr/local/Cellar/postgresql/9.1.3/lib
LOCALEDIR = /usr/local/Cellar/postgresql/9.1.3/share/locale
MANDIR = /usr/local/Cellar/postgresql/9.1.3/share/man
SHAREDIR = /usr/local/Cellar/postgresql/9.1.3/share/postgresql
SYSCONFDIR = /usr/local/Cellar/postgresql/9.1.3/etc
PGXS = /usr/local/Cellar/postgresql/9.1.3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--disable-debug' '--prefix=/usr/local/Cellar/postgresql/9.1.3' '--datadir=/usr/local/Cellar/postgresql/9.1.3/share/postgresql' '--docdir=/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql' '--enable-thread-safety' '--with-bonjour' '--with-gssapi' '--with-krb5' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ossp-uuid' '--with-python' '--with-perl' 'ARCHFLAGS='''-arch x86_64'''' 'CC=/usr/bin/llvm-gcc' 'CFLAGS=-Os -w -pipe -march=core2 -msse4 -I/usr/local/Cellar/ossp-uuid/1.6.2/include' 'LDFLAGS=-L/usr/local/Cellar/readline/6.2.2/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib' 'LIBS=-luuid' 'CPPFLAGS=-I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2'
CC = /usr/bin/llvm-gcc
CPPFLAGS = -I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2 -I/usr/local/include/libxml2
CFLAGS = -Os -w -pipe -march=core2 -msse4 -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv
CFLAGS_SL =*
LDFLAGS = -L/usr/local/Cellar/readline/6.2.2/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib -L/usr/local/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX =*
LDFLAGS_SL =*
LIBS = -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline-lm -luuid
VERSION = PostgreSQL 9.1.3

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D /user/local/var/postgres status
pg_ctl: no server running

Even though the result above is "no server running", I am do have a postgres server running.

larson:~ larson$ ps -a | grep postgres
17476 ttys001 * *0:00.12 postgres -D /usr/local/var/postgres
17543 ttys002 * *0:00.00 grep postgres

On a final note when I try to run psql I get the following result:

larson:~ larson$ psql
psql: FATAL: *database "larson" does not exist
Thanks,
Andrew
On Apr 27, 2012, at 09:51 PM, raghu ram <raghuchennuru (AT) gmail (DOT) com> wrote:



On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov <andy.lauerbarinov (AT) me (DOT) com>wrote:
Hi Everyone,

I am trying to get pg working on os x lion and getting some configuration errors. Wondering if anyone on this list faced these before.

I installed pg via homebrew and I get this error when trying to launch it via a local web server on my machine:*
could not connect to server: No such file or directory

Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
So I go ahead and try to run postgres directly. When I do I get this:

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/postgres ; exit; 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. logout
So my thinking here is that the config files are missing. I searched for pg_hba.conf file and couldn't find it. Now I am unsure how to proceed, when Iused pg on os x Snow Leopard I could go into a ~/Library/Developer/postgresql folder and all my config files would be there. There would also be logsI could read to get a better idea of what's going. Now those seem to be missing, does anyone know where I can find them?
Thanks in advance for your help,
Andrew


Could you please share below*information for*troubleshooting this issue:

/usr/local/Cellar/postgresql/9.1.3/bin/pg_config

/usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D <data Directory Path> status

--
Thanks & Regards,
Raghu Ram
EnterpriseDB: http://www.enterprisedb.com

Reply With Quote
  #4  
Old   
Andrew Barinov
 
Posts: n/a

Default Re: [ADMIN] Configuring pg on os x lion - 04-28-2012 , 04:02 PM



Hi,

I'd just like to say that I resolved my issue.

Thanks!
Andrew

On Apr 28, 2012, at 12:58 PM, Andrew Barinov <andy.lauerbarinov (AT) me (DOT) com> wrote:

Hi,

Sure, here are the results from the two commands:

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/pg_config
BINDIR = /usr/local/Cellar/postgresql/9.1.3/bin
DOCDIR = /usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql
HTMLDIR = /usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql
INCLUDEDIR = /usr/local/Cellar/postgresql/9.1.3/include
PKGINCLUDEDIR = /usr/local/Cellar/postgresql/9.1.3/include
INCLUDEDIR-SERVER = /usr/local/Cellar/postgresql/9.1.3/include/server
LIBDIR = /usr/local/Cellar/postgresql/9.1.3/lib
PKGLIBDIR = /usr/local/Cellar/postgresql/9.1.3/lib
LOCALEDIR = /usr/local/Cellar/postgresql/9.1.3/share/locale
MANDIR = /usr/local/Cellar/postgresql/9.1.3/share/man
SHAREDIR = /usr/local/Cellar/postgresql/9.1.3/share/postgresql
SYSCONFDIR = /usr/local/Cellar/postgresql/9.1.3/etc
PGXS = /usr/local/Cellar/postgresql/9.1.3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--disable-debug' '--prefix=/usr/local/Cellar/postgresql/9.1.3' '--datadir=/usr/local/Cellar/postgresql/9.1.3/share/postgresql' '--docdir=/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql' '--enable-thread-safety' '--with-bonjour' '--with-gssapi' '--with-krb5' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ossp-uuid' '--with-python' '--with-perl' 'ARCHFLAGS='''-arch x86_64'''' 'CC=/usr/bin/llvm-gcc' 'CFLAGS=-Os -w -pipe -march=core2 -msse4 -I/usr/local/Cellar/ossp-uuid/1.6.2/include' 'LDFLAGS=-L/usr/local/Cellar/readline/6.2.2/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib' 'LIBS=-luuid' 'CPPFLAGS=-I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2'
CC = /usr/bin/llvm-gcc
CPPFLAGS = -I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2 -I/usr/local/include/libxml2
CFLAGS = -Os -w -pipe -march=core2 -msse4 -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv
CFLAGS_SL =*
LDFLAGS = -L/usr/local/Cellar/readline/6.2.2/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib -L/usr/local/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX =*
LDFLAGS_SL =*
LIBS = -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline-lm -luuid
VERSION = PostgreSQL 9.1.3

larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D /user/local/var/postgres status
pg_ctl: no server running

Even though the result above is "no server running", I am do have a postgres server running.

larson:~ larson$ ps -a | grep postgres
17476 ttys001 * *0:00.12 postgres -D /usr/local/var/postgres
17543 ttys002 * *0:00.00 grep postgres

On a final note when I try to run psql I get the following result:

larson:~ larson$ psql
psql: FATAL: *database "larson" does not exist
Thanks,
Andrew
On Apr 27, 2012, at 09:51 PM, raghu ram <raghuchennuru (AT) gmail (DOT) com> wrote:



On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov <andy.lauerbarinov (AT) me (DOT) com>wrote:
Hi Everyone,

I am trying to get pg working on os x lion and getting some configuration errors. Wondering if anyone on this list faced these before.

I installed pg via homebrew and I get this error when trying to launch it via a local web server on my machine:*
could not connect to server: No such file or directory
Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
So I go ahead and try to run postgres directly. When I do I get this:
larson:~ larson$ /usr/local/Cellar/postgresql/9.1.3/bin/postgres ; exit; 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. logout
So my thinking here is that the config files are missing. I searched for pg_hba.conf file and couldn't find it. Now I am unsure how to proceed, when Iused pg on os x Snow Leopard I could go into a ~/Library/Developer/postgresql folder and all my config files would be there. There would also be logsI could read to get a better idea of what's going. Now those seem to be missing, does anyone know where I can find them?
Thanks in advance for your help,
Andrew


Could you please share below*information for*troubleshooting this issue:

/usr/local/Cellar/postgresql/9.1.3/bin/pg_config

/usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D <data Directory Path> status

--
Thanks & Regards,
Raghu Ram
EnterpriseDB: http://www.enterprisedb.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.