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

Поиск
Список
Период
Сортировка
От Steve Langlois
Тема Re: Is it possible to control the location of the lock file when starting postgres?
Дата
Msg-id F3B1BA29-032B-491F-AB24-08BC0B052D72@tavve.com
обсуждение исходный текст
Ответ на Re: Is it possible to control the location of the lock file when starting postgres?  (Steve Langlois <steve.langlois@tavve.com>)
Ответы Re: Is it possible to control the location of the lock file when starting postgres?  (John R Pierce <pierce@hogranch.com>)
Re: Is it possible to control the location of the lock file when starting postgres?  (rob stone <floriparob@gmail.com>)
Список pgsql-general

On Jul 20, 2016, at 7:48 PM, Steve Langlois <steve.langlois@tavve.com> 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Is it possible to control the location of the lock file when starting postgres?
Следующее
От: Steve Langlois
Дата:
Сообщение: Re: Is it possible to control the location of the lock file when starting postgres?