PostgreSQL 相关的内容

PostgreSQL 相关的内容

pgsql的安装最好是BT以外安装,否则安装应用一些插件会有问题!
 
前端启动pgsql
sudo -u postgres psql

 

sudo systemctl start 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/mainCode 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 foundCode 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.

参考: https://www.postgresqltutorial.com/postgresql-administration/postgresql-restart-ubuntu/
 
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥

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 重置用户密码

 

学术交流文章,不做为临床依据,特此声明。发布者:Chu,转转请注明出处:https://www.icu.cn/?p=15422

(0)
打赏 微信扫一扫 微信扫一扫
Chu的头像Chu
上一篇 2024年7月27日 下午3:08
下一篇 2024年7月31日 上午7:48

相关推荐