PostgreSQL's `target_session_attrs` is not supported
DerEnderKeks opened this issue · 2 comments
Currently, it is not possible to use a PostgreSQL cluster that is based on the native client failover mechanism using target_session_attrs
, which is implemented in libpq, because Kine is using lib/pq, which doesn't implement this feature.
Starting K3s with a PostgreSQL URL that contains the target_session_attrs
parameter thus results in the following error:
level=fatal msg="starting kubernetes: preparing server: creating storage endpoint: building kine: pq: unrecognized configuration parameter \"target_session_attrs\""
As lib/pq is currently in maintenance mode, this feature probably won't happen there, and it would thus be required to replace lib/pq with a driver that supports the target_session_attrs
feature, preferably one that is based on libpq itself. Alternatively, something like jackc/pgx could be used, which is also written in pure Go, just like lib/pq, in case that this is a requirement.
Would it be feasible to do this? I would offer my help, if you are ok with replacing the driver with something else.
If you're willing to take a shot at replacing it, please do so!
As the PR is merged, I'm closing this issue. As soon as the Kine version in K3s gets bumped, this problem should be solved there.