PostgreSQL 相关的内容
Restarting PostgreSQL on Ubuntu using the pg_ctl command
If you show more information about the restart process, you can use the pg_ctl
command:
sudo -u postgres pg_ctl restart -D /var/lib/postgresql/<version>/main
Code language: JavaScript (javascript) sudo -u postgres pg_ctl restart -D /var/lib/postgresql/16/main
In this command, you need to replace <version>
with your PostgreSQL version number.
Note that the data directory is /var/lib/postgresql/<version>/main
by default. If your PostgreSQL data directory is different, you need to adjust it accordingly.
For example, to restart PostgreSQL 16.x, you can use the following command:
sudo -u postgres pg_ctl restart -D /var/lib/postgresql/16/main
Code language: JavaScript (javascript)
If you encounter the following error, the pg_ctl
may not be in your system’s PATH:
sudo: pg_ctl: command not found
Code language: HTTP (http)
To fix it, you need to create a symbolic link to pg_ctrl in /usr/local/bin/
:
sudo ln -s /usr/lib/postgresql/<version>/bin/pg_ctl /usr/local/bin/pg_ctl
Code language: HTML, XML (xml)
Replace the <version>
with your PostgreSQL version number.
For example, the following command restarts the PostgreSQL 16.x on Ubuntu: 后端启动,系统重启要重新启动
sudo -u postgres pg_ctl restart -D /var/lib/postgresql/16/main
Code language: JavaScript (javascript)
Now, you should be able to use pg_ctl
from any directory.
Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query., Server:3-12, Process: bed, Line: 3, Level: 16————–原因:连接远程视图,改为实体表没问题。
PostgreSQL查看版本信息
PostgreSql重置用户密码
pgAdmin 4备份数据库失败,解决
学术交流文章,不做为临床依据,特此声明。发布者:Chu,转转请注明出处:https://www.icu.cn/?p=15422