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@xxxxxxxxx> wrote:
On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov <andy.lauerbarinov@xxxxxx> wrote:Could you please share below information for troubleshooting this issue: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 I 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
/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