primary-standby
我有一个遵循架构以高可用性模式运行的多节点 Postgres 集群。
postgres-0 5/5 Running 0 111s
postgres-1 5/5 Running 0 3m4s
postgres-monitor-0 4/4 Running 0 13m
其中一个primary
pod 处于模式,另一个 pod 处于从某种方式standby
复制的模式下,而待机保持在该模式下。primary
synchronous
read-only
我正在运行以下 CRUD 命令来更新本地文件:
-- Update pg_config to allow access to the users
create table hba ( lines text );
copy hba from '/pgsql/data/pg_hba.conf';
insert into hba (lines) values ('host all all 0.0.0.0/0 md5');
insert into hba (lines) values ('host all all ::/0 md5');
copy hba to '/pgsql/data/pg_hba.conf';
-- reload the config
select pg_reload_conf();
问题是,文件在节点上而不是在节点上/pgsql/data/pg_hba.conf
更新(因为所有查询都转到主节点),这意味着当节点关闭时,配置更改将重置为原始值。primary
standby
primary