diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-04-12 13:25:29 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-04-12 13:25:29 -0400 |
commit | 2c9381840fe2d6d1c3179350493fe5fd3dcf90b5 (patch) | |
tree | a3f2602820c03debd96074c6621ac62a0e3f12a0 /src/backend/jit/llvm/llvmjit_expr.c | |
parent | d4f109e4a2c028bcd889cc44d84b10fff7d9186b (diff) | |
download | postgresql-2c9381840fe2d6d1c3179350493fe5fd3dcf90b5.tar.gz postgresql-2c9381840fe2d6d1c3179350493fe5fd3dcf90b5.zip |
Remove not-very-useful early checks of __pg_log_level in logging.h.
Enforce __pg_log_level message filtering centrally in logging.c,
instead of relying on the calling macros to do it. This is more
reliable (e.g. it works correctly for direct calls to pg_log_generic)
and it saves a percent or so of total code size because we get rid of
so many duplicate checks of __pg_log_level.
This does mean that argument expressions in a logging macro will be
evaluated even if we end up not printing anything. That seems of
little concern for INFO and higher levels as those messages are printed
by default, and most of our frontend programs don't even offer a way to
turn them off. I left the unlikely() checks in place for DEBUG
messages, though.
Discussion: https://postgr.es/m/3993549.1649449609@sss.pgh.pa.us
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_expr.c')
0 files changed, 0 insertions, 0 deletions