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

Allow prepareThreshold, preparedStatementCacheQueries and preparedStatementCacheSizeMiB to pass 0 values. #7345

Closed
daneshk opened this issue Nov 8, 2024 · 1 comment · Fixed by ballerina-platform/module-ballerinax-postgresql#1083
Assignees
Labels
module/postgresql Priority/Highest Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug

Comments

@daneshk
Copy link
Member

daneshk commented Nov 8, 2024

Description

As per the PostgreSQL documentation[1], we should be able to pass 0 value for the prepareThreshold, preparedStatementCacheQueries and preparedStatementCacheSizeMiB to disable the feature. But in Ballerina PostgreSQL connector doesn't allow to pass 0 value.

  1. https://jdbc.postgresql.org/documentation/use/

Steps to Reproduce

Configure PostgreSQL client to pass like below,

postgresql:Client  dbClient = new (host = postgres_host,
                                              username = postgres_user,
                                              password = postgres_password,
                                              database = postgres_name,
                                              port = postgres_port,
                                              connectionPool = {maxOpenConnections: 5},
                                              options = {
                                                  preparedStatementThreshold: 0
                                              });

Version

Latest

Environment Details (with versions)

No response

@daneshk
Copy link
Member Author

daneshk commented Nov 11, 2024

This issue is fixed in the main branch and released 1.13.2 version. Hence, I am closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/postgresql Priority/Highest Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant