時(shí)間:2024-02-24 17:17作者:下載吧人氣:22
當(dāng)PostgreSQL啟用日志時(shí),若postgresql.conf日志的相關(guān)參數(shù)還使用默認(rèn)值的話磁盤(pán)很容易被撐爆.因此在啟用了logging_collector參數(shù)時(shí),需要對(duì)其它相關(guān)的參數(shù)進(jìn)行調(diào)整.
系統(tǒng)默認(rèn)參數(shù)如下
#log_destination = ‘stderr’ #日志格式,值為stderr, csvlog, syslog, and eventlog之一.
logging_collector = on #啟用日志
#log_directory = ‘log’ #日志文件存儲(chǔ)目錄
#log_filename = ‘postgresql-%Y-%m-%d_%H%M%S.log’ #日志文件命名方,默認(rèn)為每秒一個(gè)文件(postgresql-2017-10-18_231548.log)
#log_file_mode = 0600 #日志文件權(quán)限
#log_truncate_on_rotation = off #是否截?cái)嗳罩疚募?/pre>
網(wǎng)友評(píng)論