Cannot get log_min_duration_statement to work

让人想犯罪 __ 提交于 2019-12-03 07:58:08
log_statement = 'all'

instructs the server to log all statements, simple as that. In addition,

log_duration = on

also instructs the server to log all statements, including duration info.
Change that to

log_statement = none
log_duration = off

No quotes needed. Or comment them out and reload. Then no statement will logged, except those running longer than 1000 ms - instructed by

log_min_duration_statement = 1000

It's all in the excellent manual.

Should be:

log_destination = 'csvlog'
logging_collector = on
log_min_duration_statement = 1000
log_line_prefix = '%t %p %r %d %u '### more context
log_statement = 'ddl' ### log schema changes 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!