WALRedo: Limit logging to log_level = ERROR and above (#5587)

This fixes issues in pageserver's walredo process where WALRedo
logs of loglevel=LOG are interpreted as errors.

## Problem

See #5560

## Summary of changes

Set the log level to something that doesn't include LOG.
This commit is contained in:
MMeent
2023-10-26 13:21:41 +02:00
committed by GitHub
parent e0ebdfc7ce
commit 6129077d31
2 changed files with 10 additions and 1 deletions

View File

@@ -201,6 +201,16 @@ WalRedoMain(int argc, char *argv[])
#endif
am_wal_redo_postgres = true;
/*
* Pageserver treats any output to stderr as an ERROR, so we must
* set the log level as early as possible to only log FATAL and
* above during WAL redo (note that loglevel ERROR also logs LOG,
* which is super strange but that's not something we can solve
* for here. ¯\_(-_-)_/¯
*/
SetConfigOption("log_min_messages", "FATAL", PGC_SUSET, PGC_S_OVERRIDE);
SetConfigOption("client_min_messages", "ERROR", PGC_SUSET,
PGC_S_OVERRIDE);
/*
* WAL redo does not need a large number of buffers. And speed of

View File

@@ -1631,7 +1631,6 @@ class NeonPageserver(PgProtocol):
".*took more than expected to complete.*",
# these can happen during shutdown, but it should not be a reason to fail a test
".*completed, took longer than expected.*",
'.*registered custom resource manager \\\\"neon\\\\".*',
# AWS S3 may emit 500 errors for keys in a DeleteObjects response: we retry these
# and it is not a failure of our code when it happens.
".*DeleteObjects.*We encountered an internal error. Please try again.*",