我在 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/