[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: [ADMIN] Configuring pg on os x lion
From:       Andrew Barinov <andy.lauerbarinov () me ! com>
Date:       2012-04-28 21:02:19
Message-ID: 350d44e5-dcc8-eb3a-bd57-93db50b39257 () me ! com
[Download RAW message or body]

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@me.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@gmail.com> wrote:



On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov <andy.lauerbarinov@me.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 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


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


[Attachment #3 (text/html)]

<html><body><div>Hi,</div><div><br></div><div>I'd just like to say that I resolved my \
issue.</div><div><br>Thanks!</div><div><pre style="font-family: \
Helvetica,Arial,sans-serif; font-size: 13px; white-space: pre-wrap" \
data-mce-style="font-family: Helvetica,Arial,sans-serif; font-size: 13px; \
white-space: pre-wrap;">Andrew</pre></div><div><br>On Apr 28, 2012, at 12:58 PM, \
Andrew Barinov &lt;andy.lauerbarinov@me.com&gt; wrote:<br><br></div><div><blockquote \
type="cite"><div class="msg-quote"><div>Hi,</div><div><br></div><div>Sure, here are \
the results from the two commands:</div><div><br></div><div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">larson:~ larson$ \
/usr/local/Cellar/postgresql/9.1.3/bin/pg_config</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">BINDIR = \
/usr/local/Cellar/postgresql/9.1.3/bin</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">DOCDIR = \
/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">HTMLDIR = \
/usr/local/Cellar/postgresql/9.1.3/share/doc/postgresql</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">INCLUDEDIR = \
/usr/local/Cellar/postgresql/9.1.3/include</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">PKGINCLUDEDIR = \
/usr/local/Cellar/postgresql/9.1.3/include</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">INCLUDEDIR-SERVER = \
/usr/local/Cellar/postgresql/9.1.3/include/server</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">LIBDIR = \
/usr/local/Cellar/postgresql/9.1.3/lib</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">PKGLIBDIR = /usr/local/Cellar/postgresql/9.1.3/lib</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">LOCALEDIR = \
/usr/local/Cellar/postgresql/9.1.3/share/locale</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">MANDIR = \
/usr/local/Cellar/postgresql/9.1.3/share/man</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">SHAREDIR = \
/usr/local/Cellar/postgresql/9.1.3/share/postgresql</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">SYSCONFDIR = \
/usr/local/Cellar/postgresql/9.1.3/etc</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">PGXS = /usr/local/Cellar/postgresql/9.1.3/lib/pgxs/src/makefiles/pgxs.mk</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">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'</span></div><div><span style="font-family: 'courier new', \
monospace; " data-mce-style="font-family: 'courier new', monospace;">CC = \
/usr/bin/llvm-gcc</span></div><div><span style="font-family: 'courier new', \
monospace; " data-mce-style="font-family: 'courier new', monospace;">CPPFLAGS = \
-I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2 \
-I/usr/local/include/libxml2</span></div><div><span style="font-family: 'courier \
new', monospace; " data-mce-style="font-family: 'courier new', monospace;">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</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">CFLAGS_SL =&nbsp;</span></div><div><span style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">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</span></div><div><span style="font-family: 'courier new', \
monospace; " data-mce-style="font-family: 'courier new', monospace;">LDFLAGS_EX \
=&nbsp;</span></div><div><span style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">LDFLAGS_SL \
=&nbsp;</span></div><div><span style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">LIBS = -lpgport -lxslt -lxml2 \
-lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -luuid</span></div><div><span \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;">VERSION = PostgreSQL \
9.1.3</span></div></div><div><br></div><div><div><span style="font-family: 'courier \
new', monospace; " data-mce-style="font-family: 'courier new', monospace;">larson:~ \
larson$ /usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D /user/local/var/postgres \
status</span></div><div><span style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">pg_ctl: no server \
running</span></div></div><div><span style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', \
monospace;"><br></span></div><div><div>Even though the result above is "no server \
running", I am do have a postgres server running.</div><div style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;"><br></div><div style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">larson:~ larson$ ps -a | grep \
postgres</div><div style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">17476 ttys001 &nbsp; \
&nbsp;0:00.12 postgres -D /usr/local/var/postgres</div><div style="font-family: \
'courier new', monospace; " data-mce-style="font-family: 'courier new', \
monospace;">17543 ttys002 &nbsp; &nbsp;0:00.00 grep postgres</div><div \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;"><br></div><div style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;"><span style="font-family: \
helvetica, sans-serif; " data-mce-style="font-family: helvetica, sans-serif;">On a \
final note when I try to run psql I get the following result:</span></div></div><div \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;"><span style="font-family: helvetica, sans-serif; " \
data-mce-style="font-family: helvetica, sans-serif;"><br></span></div><div \
style="font-family: 'courier new', monospace; " data-mce-style="font-family: 'courier \
new', monospace;"><div style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">larson:~ larson$ \
psql</div><div style="font-family: 'courier new', monospace; " \
data-mce-style="font-family: 'courier new', monospace;">psql: FATAL: &nbsp;database \
"larson" does not exist</div></div><div><pre style="font-family: \
Helvetica,Arial,sans-serif; font-size: 13px; white-space: pre-wrap" \
data-mce-style="font-family: Helvetica,Arial,sans-serif; font-size: 13px; \
white-space: pre-wrap;">Thanks,</pre><pre style="font-family: \
Helvetica,Arial,sans-serif; font-size: 13px; white-space: pre-wrap" \
data-mce-style="font-family: Helvetica,Arial,sans-serif; font-size: 13px; \
white-space: pre-wrap;">Andrew</pre></div><div>On Apr 27, 2012, at 09:51 PM, raghu \
ram &lt;raghuchennuru@gmail.com&gt; wrote:<br><br></div><div><blockquote \
type="cite"><div class="msg-quote"><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Sat, Apr 28, 2012 at 12:52 AM, Andrew Barinov <span \
dir="ltr">&lt;<a href="mailto:andy.lauerbarinov@me.com" \
data-mce-href="mailto:andy.lauerbarinov@me.com">andy.lauerbarinov@me.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px \
#ccc solid; padding-left: 1ex;"><div><div>Hi Everyone,</div><div><br></div><div>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.</div><div><br></div><div>I \
installed pg via homebrew and I get this error when trying to launch it via a local \
web server on my machine:&nbsp;</div><div><span \
style="border-collapse:collapse;font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;font-size:14px;line-height:18px;white-space:pre-wrap" \
data-mce-style="border-collapse: collapse; font-family: Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif; font-size: 14px; line-height: 18px; white-space: \
pre-wrap;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left: \
0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-w \
idth:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-s \
tyle:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-im \
age:initial;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;background-repeat:initial initial" data-mce-style="border-style: \
initial; border-color: initial; font-size: 14px; vertical-align: baseline; \
background-image: initial; background-color: #eeeeee; font-family: \
Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans \
Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif; background-repeat: \
initial initial; border-width: 0px; padding: 0px; margin: 0px;"> could not connect to \
server: No such file or directory</code></span></div><pre \
style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top: \
5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border- \
right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;bor \
der-color:initial;font-size:14px;vertical-align:baseline;background-image:initial;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;width:auto;max-height:600px;background-repeat:initial initial" \
data-mce-style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: \
0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: \
baseline; background-image: initial; background-color: #eeeeee; font-family: \
Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans \
Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif; width: auto; \
max-height: 600px; background-repeat: initial initial; border-width: 0px; padding: \
5px;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;p \
adding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width: \
0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style: \
initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:i \
nitial;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;background-repeat:initial initial" data-mce-style="border-style: \
initial; border-color: initial; font-size: 14px; vertical-align: baseline; \
background-image: initial; background-color: #eeeeee; font-family: \
Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans \
Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif; background-repeat: \
initial initial; border-width: 0px; padding: 0px; margin: 0px;"> Is the server \
running locally and accepting connections on Unix domain socket \
"/tmp/.s.PGSQL.5432"?</code></pre><div><pre \
style="font-family:Helvetica,Arial,sans-serif;font-size:13px;white-space:pre-wrap" \
data-mce-style="font-family: Helvetica,Arial,sans-serif; font-size: 13px; \
white-space: pre-wrap;">So I go ahead and try to run postgres directly. When I do I \
get this:</pre><pre style="margin-top:0px;margin-right:0px;margin-bottom:10px;margin-l \
eft:0px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-t \
op-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;bord \
er-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;backgroun \
d-image:initial;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;width:auto;max-height:600px;background-repeat:initial initial" \
data-mce-style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: \
0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: \
baseline; background-image: initial; background-color: #eeeeee; font-family: \
Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans \
Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif; width: auto; \
max-height: 600px; background-repeat: initial initial; border-width: 0px; padding: \
5px;"><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;p \
adding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width: \
0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style: \
initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:i \
nitial;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida \
Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier \
New',monospace,serif;background-repeat:initial initial" data-mce-style="border-style: \
initial; border-color: initial; font-size: 14px; vertical-align: baseline; \

</pre></div></div></blockquote></div>Could you please share below&nbsp;information \
for&nbsp;troubleshooting this issue:</div><div class="gmail_extra"><br></div><div \
class="gmail_extra">/usr/local/Cellar/postgresql/9.1.3/bin/pg_config</div><div \
class="gmail_extra"><br></div><div \
class="gmail_extra">/usr/local/Cellar/postgresql/9.1.3/bin/pg_ctl -D &lt;data \
Directory Path&gt; status</div><div class="gmail_extra"><br></div><div \
class="gmail_extra">-- <br><p>Thanks &amp; Regards,</p><p>Raghu \
Ram</p><p>EnterpriseDB: <a href="http://www.enterprisedb.com/" \
data-mce-href="http://www.enterprisedb.com/"><span>http://www.enterprisedb.com</span>< \
/a></p><br></div></div></blockquote></div></div></blockquote></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic