Reducing the log spam
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-03-05T12:55:34Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
plpgsql: make WHEN OTHERS distinct from WHEN SQLSTATE '00000'.
- 58fdca2204de 18.0 cited
Inspired by feedback to [1], I thought about how to reduce log spam. My experience from the field is that a lot of log spam looks like database/table/... "xy" does not exist duplicate key value violates unique constraint "xy" So what about a parameter "log_suppress_sqlstates" that suppresses logging ERROR and FATAL messages with the enumerated SQL states? My idea for a default setting would be something like log_suppress_sqlstates = '23505,3D000,3F000,42601,42704,42883,42P01' but that's of course bikeshedding territory. Yours, Laurenz Albe [1]: https://postgr.es/m/b8b8502915e50f44deb111bc0b43a99e2733e117.camel%40cybertec.at