Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL's target_session_attrs is not supported #159

Closed
DerEnderKeks opened this issue Feb 5, 2023 · 2 comments
Closed

PostgreSQL's target_session_attrs is not supported #159

DerEnderKeks opened this issue Feb 5, 2023 · 2 comments

Comments

@DerEnderKeks
Copy link
Contributor

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.

@brandond
Copy link
Member

brandond commented Feb 6, 2023

If you're willing to take a shot at replacing it, please do so!

@DerEnderKeks
Copy link
Contributor Author

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.

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

No branches or pull requests

2 participants