Search Postgresql Archives

Re: Is it possible to control the location of the lock file when starting postgres?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 20, 2016, at 7:48 PM, Steve Langlois <steve.langlois@xxxxxxxxx> wrote:

you never did answer my previous question, why are you messing about with manually starting postgres from the wrong user account, when it should be run as a system service with systemctl ?

I am upgrading an existing system running CentOS 5.6 with Postgres 8.2.5 to CentOS 7 with 9.2.15. The original system modified the postgresql script to manually running postmaster to start the database under the current user control. So it is really for compatibility with the rest of the code. 

If local is used for unix domain socket connections do I change --auth to --auth-local=ident for initdb?


I tried the following:

/usr/bin/initdb --pgdata=/usr/test/databases/pgsql1/data --auth-local=trust

changed unix_socket_directories = '/tmp’ in postgresql.conf.

Then ran:

/usr/bin/postgres -k /tmp -D /usr/tavve/databases/pgsql1/data &

Contents of pg_hba.conf is 

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     slanglois                                trust
#host    replication     slanglois        127.0.0.1/32            trust
#host    replication     slanglois        ::1/128                 trust

Then I try to run psql and 

[20:01:11 slanglois@tron bin]$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432”?

I would expect local all all trust to allow me to connect.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux