本节简单介绍了PostgreSQL数据库启动时乐动体育LD90.VIP上的socket存储的目录的配置,其对应的参数为unix_socket_directories。
unix_socket_directories参数默认为/tmp,由于该目录是临时目录,以免误操作,一般设置在其他目录中。
下面把unix_socket_directories设置为/data/pg12,重新启动
[pg12@localhost pg120db]$ grep ‘unix’ postgresql.conf
unix_socket_directories = ‘/data/pg12’ # comma-separated list of directories
#unix_socket_directories = ‘/tmp’ # comma-separated list of directories
#unix_socket_group = ‘’ # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
[pg12@localhost pg120db]$
[pg12@localhost pg120db]$ pg_ctl restart
pg_ctl: PID file “/data/pgsql/pg120db/postmaster.pid” does not exist
Is server running?
trying to start server anyway
waiting for server to start…2019-11-18 18:17:35.123 CST [15542] LOG: starting PostgreSQL 12.0 on x86_64-pc-linux-gnu, compiled by gcc (GC