PostgreSQL 链接池
约 1 分钟阅读
- 每个链接一个进程
- 最大链接数 max_connections
- 进程内存分为 - 默认每个链接 10M 左右
- 本地内存
- work_mem - 默认 4M
- ORDER BY, DISTINCT, JOIN
- maintenance_work_mem
- autovacuum_work_mem
- VACUUM
- temp_buffers - 默认 8M
- 临时表
- work_mem - 默认 4M
- 共享内存
- shared_buffers
- wal_buffers
- Commit Log
- 本地内存
- 参考
- What to Check if PostgreSQL Memory Utilization is High链接severalnines.com/database-blog/what-check-if-postgresql-memory-utilization-high每个链接一个进程 · 最大链接数 maxconnections · 进程内存分为 - 默认每个链接 10M 左右 · 本地内存 · workmem - 默认 4M · ORDER BY, DISTINCT, JOIN · maintenanceworkmem笔记:PostgreSQL 链接池
- Scaling Connections in Postgres
- pgtune.leopard.in.ua
- gist.github.com/rgreenjr/3637525
select * from pg_stat_activity;
select * FROM pg_stat_activity where state <> 'idle';
show max_connections;
show work_mem;
show autovacuum_work_mem;
show maintenance_work_mem;
show temp_buffers;
show shared_buffers;
show wal_buffers;关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
其他外链4 条
- gist.github.com/rgreenjr/3637525gist.github.com/rgreenjr/3637525
- pgtune.leopard.in.uapgtune.leopard.in.ua/
- severalnines.com/database-blog/what-check-if-postgresql-memory-utilization-highseveralnines.com/database-blog/what-check-if-postgresql-memory-utilization-high
- www.citusdata.com/blog/2017/05/10/scaling-connections-in-postgreswww.citusdata.com/blog/2017/05/10/scaling-connections-in-postgres