Postgresql默认数据文件地址为/var/lib/pgsql/*,修改步骤如下:
- Create new dir,here is /Alkheme/pgsql
- Change own to postgres:postgres. "chown -R postgres:postgres pgsql/"
- su postgres and initial data dir "initdb /Alkheme/pgsql"
- Change lines in file /etc/init.d/postgres
"PGDATA=/Alkheme/pgsql/
PGLOG=/Alkheme/pgsql/pgstartup.log
"
原文链接:https://www.f2er.com/postgresql/196948.html