原 pgpool使用总结
Tags: 原创PGGreenPlumPostgreSQLPgpool-IIpgpool总结
内存占用很大
配置如下参数:
1 2 3 4 5 6 | child_max_connections = 1 connection_life_time = 600 client_idle_limit = 300 child_life_time = 5min |
检查:
1 2 | systemctl restart pgpool.service ps_mem |
含义参考:
https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html
pgpool升级
直接按照之前的方法安装一遍即可。
下载:https://www.pgpool.net/mediawiki/index.php/Downloads
监控
可以使用prometheus监控,grafana展示。
数据库
可以用于GP和PG数据库!!!
内存缓存使用注意事项
参考:https://my.dbaup.com/greenplum-pgpool-jiagouhuancunchaxunjieguojiasuwebjiemianzhanshi.html
https://www.pgpool.net/docs/latest/en/html/in-memory-query-caching.html
https://www.pgpool.net/docs/latest/en/html/runtime-in-memory-query-cache.html
从gppool 4.6开始,可以强制走缓存:
1 | /*FORCE QUERY CACHE*/SELECT now(); |
不强制走缓存:
1 | /*NO QUERY CACHE*/SELECT now(); |
如下这些SQL不会缓存:
1 2 3 4 5 6 7 8 9 10 11 | SELECT including non immutable functions SELECT including temp tables, unlogged tables SELECT including TIMESTAMP WITH TIMEZONE or TIME WITH TIMEZONE SELECT including CAST to TIMESTAMP WITH TIMEZONE or TIME WITH TIMEZONE SELECT including SQLValueFunction (CURRENT_TIME, CURRENT_USER etc.) SELECT result is too large (memqcache_maxcache) SELECT FOR SHARE/UPDATE SELECT starting with "/*NO QUERY CACHE*/" comment (case insensitive) SELECT including system catalogs SELECT using TABLESAMPLE SELECT uses row security enabled tables |