[英]How to make sure the query run with read-only action on MySQL/PostgreSQL database?
[英]How do I make the read-only slave Postgresql12 database writable?
我创建了一个标准的 PostgreSQL 12 复制配置。 我在postgresql.conf中把hot_standby改成了off,在psql中输入了set transaction read only = off。 但是,我仍然无法创建表或数据库,也没有找到适合初学者的操作文档。 你能帮我吗,我怎样才能使我的复制数据库可写? 谢谢,
我解决了这个问题。
停止 postgresql 服务
systemctl stop postgresql
只需删除 /var/lib/postgresql/12/main 下的 standby.signal 文件
rm -rf standby.signal
将 pg_hba_conf 和 postgresql.conf 文件重新配置为原始版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.