Warning Configuration

Debug Logging Enabled

Debug-level logging is enabled, creating massive log volumes and significant performance overhead.

What is this issue?

The log_min_messages setting controls the verbosity of PostgreSQL logs:

- debug5-debug1: Extremely verbose developer debugging
- info: Informational messages
- notice: Useful notices
- warning: Warning conditions (recommended minimum)
- error: Only errors

Debug levels generate:
- Internal operation details
- Lock acquisition/release events
- Parser and planner internals
- Thousands of messages per second

Why it matters

Massive Log Volume

Gigabytes of logs per hour

Performance Overhead

10-50% performance impact

Disk Fill Risk

Logs can fill disk rapidly

Important Messages Lost

Critical errors buried in noise

How PG Pilot detects it

```sql
SELECT name, setting
FROM pg_settings
WHERE name = 'log_min_messages';
```

How to fix it

1

Set appropriate log level

For production, use warning or error:

ALTER SYSTEM SET log_min_messages = 'warning';
SELECT pg_reload_conf();
2

Use targeted debugging

For specific debugging, set per-session:

SET log_min_messages = 'debug1';
-- Debug specific issue
RESET log_min_messages;

Prevention

  • Default to 'warning' in production
  • Use per-session debug levels for investigations
  • Monitor log growth rates
  • Set up log rotation

Related Issues

Related Features

PostgreSQL Documentation