原 【DB宝72】pgpool-II和pgpoolAdmin的使用
Tags: 原创PGLinux高可用监控Pgpool-IIpgpoolAdmin
4.4、测试pgpool-II的读写分离+负载均衡+内存查询缓存功能
4.4.1、先关闭内存查询缓存
我们先关闭内存查询缓存功能,一会再来开启这个功能。
1 2 | vi /postgresql/pgpool/etc/pgpool.conf memory_cache_enabled = off |
配置完成后,重新启动pgpool服务:
1 | systemctl restart pgpool |
4.4.2、测试读写分离+负载均衡
测试过程:
1 2 3 4 5 6 7 8 9 | -- 开3个窗口,密码为lhr psql -U postgres -h 192.168.66.35 -p 19999 -d sbtest create table test(id int); insert into test values(1); select * from test; show pool_nodes; show pool_backend_stats; |
-- 获取pgPool_II 版本信息
show pool_version;本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!
不错不错哈