syslog_split_messages
是一个 配置参数,用于确定传递到 syslog 的消息是否应按行分割。
syslog_split_messages
在 PostgreSQL 9.6 中添加。
示例
将 syslog_split_messages
设置为 on
(默认值)时的日志条目示例
May 11 13:17:54 node1 postgres[1589460]: [16-1] [2024-05-17 13:17:54 UTC] LOG: 00000: automatic analyze of table "template1.pg_catalog.pg_depend" May 11 13:17:54 node1 postgres[1589460]: [16-2] #011avg read rate: 1.562 MB/s, avg write rate: 3.125 MB/s May 11 13:17:54 node1 postgres[1589460]: [16-3] #011buffer usage: 104 hits, 1 misses, 2 dirtied May 11 13:17:54 node1 postgres[1589460]: [16-4] #011system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s May 11 13:17:54 node1 postgres[1589460]: [16-5] [2024-05-17 13:17:54 UTC] LOCATION: do_analyze_rel, analyze.c:807
将 syslog_split_messages
设置为 off
时的日志条目示例
May 11 13:18:54 node1 postgres[1589075]: [15] [2024-05-17 13:14:54 UTC] LOG: 00000: automatic aggressive vacuum of table "template1.pg_catalog.pg_depend": index scans: 0#012#011pages: 0 removed, 13 remain, 13 scanned (100.00% of total)#012#011tuples: 0 removed, 1704 remain, 0 are dead but not yet removable#012#011removable cutoff: 738, which was 0 XIDs old when operation ended#012#011new relfrozenxid: 738, which is 16 XIDs ahead of previous value#012#011frozen: 0 pages from table (0.00% of total) had 0 tuples frozen#012#011index scan not needed: 0 pages from table (0.00% of total) had 0 dead item identifiers removed#012#011avg read rate: 198.446 MB/s, avg write rate: 10.445 MB/s#012#011buffer usage: 52 hits, 19 misses, 1 dirtied#012#011WAL usage: 1 records, 1 full page images, 1503 bytes#012#011system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s#012[2024-05-17 13:14:54 UTC] LOCATION: heap_vacuum_rel, vacuumlazy.c:771
参考文献
- PostgreSQL 文档: syslog_split_messages