> On 11 Apr 2023, at 17:05, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> The comment of message_level_is_interesting() says:
>
> * This is useful to short-circuit any expensive preparatory work that
> * might be needed for a logging message.
>
> Which can apply to taking a lwlock, I think.
I agree that we can, and should, use message_level_is_interesting to skip
taking this lock. Also, the more I think about the more I'm convinced that we
should not change the current logging frequency of once per table from what we
ship today. In DEGUG2 the logs should tell the whole story without requiring
extrapolation based on missing entries. So I think we should use your patch to
solve this open item. If there is interest in reducing the logging frequency
we should discuss that in its own thread, insted of it being hidden in here.
--
Daniel Gustafsson