Use postgres DB with ssl

Hello,
I am trying to setup home assistant to use an external postgres DB with SSL.
I have in configuration.yaml the following string:

recorder:
  purge_keep_days: 5
  db_url: postgresql://<db_user>:<db_pass>@<db_url>:5433/homeassistant_db?ssl=true&sslmode=verify-full&sslrootcert=/config/root.crt

But i get the following error when i start home assistant.

2022-10-14 06:54:22.649 ERROR (Recorder) [homeassistant.components.recorder.core] Error during connection setup: (psycopg2.ProgrammingErr
or) invalid dsn: invalid connection option "ssl"

Is connection with SSL not supported?