linux - 由于 ALTER SYSTEM 设置错误而无法启动 postgres

标签 linux postgresql

我在 ubuntu 16.04 上使用 PostgreSQL 9.6。今天我尝试更改设置中的一些值。通过 pgAdmin 查询工具,我添加了不存在的库的使用:

 shared_preload_libraries = 'online_analyze, plantuner'

现在由于缺少该库,postgres 无法启动,并且我无法回滚此设置,因为我无法访问 pgAdmin 中的 psql 或查询工具(postgres 未启动)。

我能做什么?

最佳答案

https://www.postgresql.org/docs/current/static/sql-altersystem.html

ALTER SYSTEM writes the given parameter setting to the postgresql.auto.conf file, which is read in addition to postgresql.conf

(格式化我的)

因此您可以通过 ssh 连接到服务器并手动编辑文件以启动 postgres。

您可以使用sudo find/-name postgresql.auto.conf轻松找到它

关于linux - 由于 ALTER SYSTEM 设置错误而无法启动 postgres,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51404415/

相关文章:

linux - 用于在 AWS s3 中部署的 Shell 脚本

macos - Postgresql macports 无法连接问题

postgresql - SET SESSION AUTHORIZATION 多用户 mod-perl2 连接缓存的安全设计

php - 如何持久化自引用的 Doctrine 实体?

windows - 如何将 Eclipse (IDE) 与 Cygwin(Linux 模拟器)一起​​使用?

mysql - Mysql安全安装所需信息

php - 如何仅使用电子邮件信息更改用户 AD 密码。 PHP

linux - 如何为命令的所有选项启用无密码 sudo?

sql - 如何在postgres中过滤json的任何键的值

Postgresql 几何线 - 找到 Y 截距