暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL基础 pg_ctl no database directory specified and environment variable PGDATA unset

CentOS 7.6.1810
postgresql 14.4

pg_ctl: no database directory specified and environment variable PGDATA unset

  • 引起问题的原因:没指定目录 并且 没设置环境变量PGDATA
[postgres@localhost ~]$ pg_ctl status pg_ctl: no database directory specified and environment variable PGDATA unset Try "pg_ctl --help" for more information.
[postgres@localhost ~]$ ps -ef | grep post postgres 9373 1 0 16:03 ? 00:00:00 /usr/pgsql-14/bin/postmaster -D /var/lib/pgsql/14/data/ postgres 9437 9373 0 16:03 ? 00:00:00 postgres: logger postgres 9457 9373 0 16:03 ? 00:00:00 postgres: checkpointer postgres 9458 9373 0 16:03 ? 00:00:00 postgres: background writer postgres 9459 9373 0 16:03 ? 00:00:00 postgres: walwriter postgres 9460 9373 0 16:03 ? 00:00:00 postgres: autovacuum launcher postgres 9461 9373 0 16:03 ? 00:00:00 postgres: stats collector postgres 9462 9373 0 16:03 ? 00:00:00 postgres: logical replication launcher root 9764 1 0 16:03 ? 00:00:00 /usr/libexec/postfix/master -w postfix 9778 9764 0 16:03 ? 00:00:00 pickup -l -t unix -u postfix 9779 9764 0 16:03 ? 00:00:00 qmgr -l -t unix -u root 10529 10449 0 16:09 pts/0 00:00:00 su - postgres postgres 10530 10529 0 16:09 pts/0 00:00:00 -bash postgres 10628 10530 0 16:12 pts/0 00:00:00 ps -ef postgres 10629 10530 0 16:12 pts/0 00:00:00 grep --color=auto post [postgres@localhost ~]$ pg_ctl status -D /var/lib/pgsql/14/data/ pg_ctl: server is running (PID: 9373) /usr/pgsql-14/bin/postgres "-D" "/var/lib/pgsql/14/data/"

学习资料


欢迎各位同学一起来交流学习心得!

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论

目录
  • pg_ctl: no database directory specified and environment variable PGDATA unset
  • 学习资料