Ubuntu或Debian可以运行Postgresql的多个实例,并提供自动启动/停止/启动每个群集的特定方法.
在/etc/postgresql/9.2/main(或更一般地说是/ etc / postgresql /< version> /< clustername>)中应该有一个名为start.conf的文件,其中包含以下不言自明的内容:
# Automatic startup configuration # auto: automatically start/stop the cluster in the init script # manual: do not start/stop in init scripts,but allow manual startup with # pg_ctlcluster # disabled: do not allow manual startup with pg_ctlcluster (this can be easily # circumvented and is only meant to be a small protection for # accidents). auto
如果您通过手动替换auto,则只能在需要时使用以下命令启动此Postgresql实例:
sudo pg_ctlcluster 9.2 main start
至于查看控制台,您需要的是在使用数据库时在终端中运行:
tail -f /var/log/postgresql/postgresql-9.2-main.log
原文地址:https://www.jb51.cc/postgresql/192238.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。