Skip to content

Conversation

@b3b
Copy link

@b3b b3b commented Nov 1, 2025

What kind of change does this PR introduce?

Bug fix: ensures the log_level option from the client startup payload is correctly applied during connection initialization.

What is the current behavior?

The log_level value from client connection options is currently ignored.
The maybe_change_log function expected the incoming payload to use string keys, but the payload from Server.decode_startup_packet uses an atom-keyed map.

Related (closed) issue: #209

What is the new behavior?

When connecting with:

PGOPTIONS='--log_level=debug' psql  'postgresql://...' -c ''

Supavisor now set the requested level, and the following appears in logs:
[notice] Setting log level to :debug appears in the Supavisor logs.

Additional context

Integration tests for this behavior are included in #770

Fixed maybe_change_log/1 to match atom-key :payload map,
ensuring log_level from client options is applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant