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

Add support for custom connection string parameters in PostgreSQL connection URL #14019

Open
romangai21 opened this issue Dec 19, 2024 · 2 comments
Labels
area/controller Controller issues, panics area/offloading Node status offloading area/workflow-archive type/feature Feature request

Comments

@romangai21
Copy link

Summary

Add support for custom connection string parameters in PostgreSQL connection URL for Argo Workflows, specifically to allow setting binary_parameters=yes. Currently, the connection string configuration doesn't support adding custom parameters, which causes issues when using PgBouncer with PostgreSQL for archiving and offloading workflows.

Use Cases

When would you use this?

The modification is particularly important for production environments where PgBouncer is commonly used as a standard practice for PostgreSQL connection pooling and management. Or any other custom use case people may have.


Message from the maintainers:

Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.

@romangai21 romangai21 added the type/feature Feature request label Dec 19, 2024
@romangai21
Copy link
Author

@shuangkun shuangkun added area/controller Controller issues, panics area/workflow-archive area/offloading Node status offloading labels Dec 19, 2024
@MasonM
Copy link
Contributor

MasonM commented Dec 19, 2024

Thanks for the details. Here's the code that'd need to change for this:

settings := postgresqladp.ConnectionURL{
User: string(userNameByte),
Password: string(passwordByte),
Host: cfg.GetHostname(),
Database: cfg.Database,
}
if cfg.SSL {
if cfg.SSLMode != "" {
options := map[string]string{
"sslmode": cfg.SSLMode,
}
settings.Options = options
}
}

The only question is whether we allow users specify an arbitrary key-value pair of options or just add an option specifically for binary_parameters=yes. I'm leaning towards the former, since that's more future-proof and could replace the existing ssl and sslMode options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/offloading Node status offloading area/workflow-archive type/feature Feature request
Projects
None yet
Development

No branches or pull requests

3 participants