Hi, In logical decoding, messages like the following are currently logged at LOG level:
LOG: starting logical decoding for slot "myslot"
DETAIL: Streaming transactions committing after 0/030872C0,
reading WAL from 0/03087288.
STATEMENT: ...
LOG: logical decoding found consistent point at 0/03087288
DETAIL: There are no running transactions.
STATEMENT: ...
These can be useful for debugging, but DBAs are typically not interested in
them. They can also be emitted frequently, for example, on each call to
functions like pg_logical_slot_peek_binary_changes() or
pg_replication_slot_advance() etc. When such functions are called repeatedly,
the logs can quickly become noisy.
The slotsync worker can also generate these messages periodically. Due to
the issue discussed at [1], this can currently happen as often as every 200ms
(which should be fixed separately). Even without that issue, these messages
would be still emitted regularly.
Given that these are mostly developer-oriented messages, logging them at
LOG level seems too verbose. I'm proposing to reduce their level to DEBUG1.
A patch is attached.
Alternatively, if we want to keep them at LOG by default, we could introduce
a GUC like trace_logical_decoding_messages, similar to
the old trace_recovery_messages, to control their verbosity independently
of log_min_messages.
Thought?
This topic came up in [1] and [2], and Amit suggested discussing it separately,
so I started this thread.
Regards,
[1]
https://postgr.es/m/cahgqgwf6zg9z8ws1yb3hy1vqv-wt7hr0qyxcn2hdbjvzqku...@mail.gmail.com
[2]
https://postgr.es/m/CAHGQGwED5kJxZ_MdCh=wla5m7ekxdnzco1zcqhqncedfaep...@mail.gmail.com
--
Fujii Masao
v1-0001-Reduce-log-level-of-some-logical-decoding-message.patch
Description: Binary data
