LOG: checkpoints are occurring too frequently (2 seconds apart) HINT: Consider increasing the configuration parameter "checkpoint_segments".

解决pg:

LOG: checkpoints are occurring too frequently (2 seconds apart)
HINT: Consider increasing the configuration parameter "checkpoint_segments".

默认checkpoint_segments = 3, 修改为32然后reload数据库重新测试。在postgreSQL.conf 中。

使用大的checkpoint_segments可以有效的减少WAL的写入量, 原因是full_page_writes, 每次checkpoint之后第一次改变的page都要写FULL PAGE以便可以从WAL获取完整的恢复页面.

参考http://www.postgresql.org/message-id/[email protected]

http://blog.163.com/digoal@126/blog/static/163877040201236112855929/

你可能感兴趣的:(configuration)