Skip to content

postgres does not support configuring sslmode #963

@mjpitz

Description

@mjpitz

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

0.9.0

Environment

  1. OS type and version: (output of uname -a)
    Linux ip-192-168-4-30 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
  2. How are you running Toolbox:
  • As a container (e.g. from us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:$VERSION)

Client

Haven't gotten this far as it's an issue related to the source.

Expected Behavior

Most Postgres clients I've worked with typically allow specifying the sslmode as a configuration option so I was a bit surprised that the toolbox didn't allow that. I was digging through the code and saw it manually configured to disable in a few location, but was not specified as part of the postgres source.

Current Behavior

I was attempting to use this tool to connect to a ClickHouse database using it's postgres port. When using the out of box postgres connector, it repeatedly failed to connect to the ClickHouse database during startup.

A mitigation for this is to use the MySQL connector as it will connect to the ClickHouse MySQL port without an issue. This will allow you to connect the tools easily, but will require that queries be written using MySQL statements.

Steps to reproduce?

I haven't tried this with a postgres container, but I'm confident it can be reproduced consistently with a ClickHouse container. I have a copy of my configuration available in OpenSource for reference:

https://github.com/mjpitz/mjpitz/blob/main/infra/lab/metrics/docker-compose.yaml#L101-L124

If you change the otel source to use a postgres kind and the port to 9005, then try to deploy the containers, you should be able to inspect the logs of the lab-metrics-mcp-toolbox-1 to see it failing to connect to the clickhouse container.

Additional Details

Was hard to tell if this was supposed to be a new feature or a bug... I would definitely classify it more as an enhancement to the existing implementation.

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions