Backend with PG and master-slave cluster


I would like to know if pg backend supports master/stand-by configuration. According to the official documentation, we should be able to use postgresql://,

I was able to setup a master/standby cluster with docker-compose but when I run terraform cli i get the following error.

Initializing modules...

Initializing the backend...
│ Error: dial tcp: lookup, no such host

Any advice/help is welcome

ref: PostgreSQL: Documentation: 13: 33.1. Database Connection Control Functions

Found the problem: add support for multiple hosts in connection settings (for feature parity with libpq) · Issue #683 · lib/pq · GitHub it’s related to the Postgres driver that does not support it yet. Unfortunately lib/pq is not longer actively maintained and looks like jackc/pgx is the way to go.

What do you think? A migration is possible ?