

I think that PostgreSQL should pick up your nf without the need to use -c - I'm not even sure that it's a correct option. Gives -c, -core-files allow postgres to produce core files eg: unixsocketdirectories '/run/postgresql' The name of the socket will be the same as the TCP port number, same config file. Notice, there are no quotes around -D or the data path. 1 Answer Sorted by: 5 The location for the unix domain socket will be configured in the nf file. Then try running pg_ctl -D /var/lib/postgresql/9.3/main/ -l logfile startĪnd then createdb my_test - it will be in the. Unix-domain sockets use the usual Unix file system permission set. unixsocketpermissions (integer) Sets the access permissions of the Unix-domain socket(s). If I were you, I'd start by executing $export PATH=/usr/lib/postgresql/9.3/bin:$PATH This parameter is irrelevant on Windows, which does not have Unix-domain sockets. Then you can use createdb test to create your first database.
#CONFIGURE POSTGRESQL UNIX SOCKET HOW TO#
(When you run initdb, you should see the above commands as a hint as to how to start the server - but, again, you may not have to run initdb). Should start the server for you - I generally use the pg_ctl option. postgres -D /usr/local/pgsql/data > logfile 2>&1 &
#CONFIGURE POSTGRESQL UNIX SOCKET INSTALL#
Initdb initialises the server instance after install (an install from an rpm or apt-get may take care of this for you). usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & In this case, the client would be configured to connect. usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data Use the following to listen on a UNIX socket as usual (default: /var/run/postgresql/.s.PGSQL.5432 ). The location for the unix domain socket will be configured in the nf file. I use the source version and have never had any problems - here is the short version of the install for the source distribution. Pg_ctl: too many command-line arguments (first is "start") It says it cannot find the configuration file, but there is no way to specify the configuration file here: $ /usr/lib/postgresql/9.3/bin/pg_ctl start "-D" "/var/lib/postgresql/9.3/main" "-c" "config_file=/etc/postgresql/9.3/main/nf" Server postgres cannot access the server configuration file "/var/lib/postgresql/9.3/main/nf": No such file or directory But I cannot get pg_ctl to run: $ /usr/lib/postgresql/9.3/bin/pg_ctl -D "/var/lib/postgresql/9.3/main" start The book then goes on to say that the pg_ctl executable, which also happens to be stored in the /usr/lib/postgresql/9.3/bin directory when installing via apt-get, is used to simplify the task. Notice we had to pass both the data directory and configuration as parameters to the postgres binary. Host all all was reading a postgresql book (PostgreSQL from Novice to Pro) and it says you can start the postmaster daemon by invoking the postgres binary which was part of the installation: /usr/lib/postgresql/9.3/bin/postgres "-D" "/var/lib/postgresql/9.3/main" "-c" "config_file=/etc/postgresql/9.3/main/nf"

Psql: FATAL: Ident authentication failed for user data]# vi data]# But this gave me an idea that something is related with the authentication protocol what’s bothering the database to start and to verify that I’ve checked pg_hba configuration file and changed the method to ‘Trust’ for this host connection type and did a restart of postgres serviced.

I tried to connect with the database once again and this time got a different set of error which is now related with Authentication which was Ident based. I tried to initialize the server and started the services on the machine and it was started smoothly with no ~]# service postgresql initdb

Is the server running locally and acceptingĬonnections on Unix domain socket "/tmp/.s.PGSQL.5432"? Psql: could not connect to server: No such file or directory This was a newly provisioned server with Postgresql 8.4 installed.Įrror is something related with the connection settings and is pasted ~]# psql I have got this new test box for some POCs related with Data Migration between Oracle and PostgreSQL, and this is the very first time i tried to connect with psql on this server and got an error.
