-
Notifications
You must be signed in to change notification settings - Fork 125
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 sslmode support for PostgreSQL database #271
Conversation
Allow pg_sslmode argument to be passed into the postgres driver. Keep default argument value to prefer to make it compatible with default postgres value (refer to https://www.postgresql.org/docs/13/libpq-ssl.html) pg_sslmode can be changed as follows: hammerdb>dbset db pg Database set to PostgreSQL hammerdb>print dict Dictionary Settings for PostgreSQL connection { pg_host = localhost pg_port = 5432 pg_sslmode = prefer } ... hammerdb>diset connection pg_sslmode disable Changed connection:pg_sslmode from prefer to disable for PostgreSQL hammerdb>print dict Dictionary Settings for PostgreSQL connection { pg_host = localhost pg_port = 5432 pg_sslmode = disable } ... All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
Many thanks for the pull request - this is something I will take a look at and then put forward for discussion at the TPC-OSS subcommittee. One thing from a quick scan is that it doesn't look like it updates the GUI - so new options would need to appear in here as well. This isn't necessarily a showstopper as it is straightforward to update, so help could be given if needed for this part. |
I have run tests on the changes. Overall, most of the implementation is fine, although some options when selected give errors and need updates. So far the issues identified are:
|
I have created a branch on my fork https://github.com/sm-shaw/HammerDB/tree/pg-sslmode with additional commits that address the issues. More testing is needed to validate all the updates, but once this is done I will create a pull request back to christianricci:pg-sslmode and once accepted this should be good to accept into the main HammerDB repository. An example of the GUI with the prefer SSL mode update is shown. On is enable, off is disable and the correct option appears in the build or driver script as required. |
Thanks for taking a look and fixing the bugs, also for adding the UI changes. It looks great !!! |
I have done some more tests and found and fixed one more issue when the asynchronous connections and connect pooling were selected at the same time. I have opened a pull request to your branch here christianricci#1. Once accepted, this should update the pull request to the main HammerDB repository with the changes needed. |
…se (#1) * Fix invalid sslmode value for Transaction Counter * Fix can't read sslmode value when using asynchronous scaling * Fix wrong number of args with sslmode for TPROC-H Refresh Function * Add sslmode to XML config for PostgreSQL connect pool * Add PostgreSQL sslmode option to GUI interface for TPROC-C/H and TX Counter * Fix sslmode for TPROC-C Asynch with Connect Pool
Thanks Steve. I have squashed/merged your changes into my pull request. |
Great, this has now been reviewed and tested all the changes needed are now in the Pull Request. All Pull Requests are discussed by the TPC-OSS subcommittee, so this will be discussed at the next meeting, and accepted subject to approval. |
@christianricci Hey Christian. Thank you for submitting this PR and working with Steve. Your contribution is greatly appreciated. I noticed above you mentioned submitting the code with the BSD-Free license. Is this a requirement from your company or can it be submitted as GPL code since that is what HammerDB is licensed under? Also, do you have any performance data on SSL on vs off that you could share as we evaluate the performance neutrality of code changes vs the 4.2 release? |
For additional clarity the contribution says "BSD-new" license (rather than BSD-Free) which is the Modified BSD as described here by the FSF: https://www.gnu.org/licenses/license-list.html#ModifiedBSD Modified BSD license (#ModifiedBSD) Therefore, according to the FSF it is fine to take the contribution as "BSD-new" and include it in HammerDB which is GPLv3 without modifying the contribution to be GPL first, @christianricci is this your understanding as well? |
Thanks Steve for correcting my error. I think my brain was used to associating the word Free with the word BSD (FreeBSD) ;-). Yes, the license in question is BSD-new. It sounds like it should be fine to accept. @christianricci is that your interpretation as well? |
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc. Full license text is at https://opensource.org/licenses/BSD-3-Clause and code published with this license is allowed to be combined and republished in HammerDB as GPLv3 by HammerDB. |
Accepting pull request as voted on September 14, 2021 in the TPC-OSS subcommittee. |
Thanks Steve, most appreciated your bug fixes and UI contribution. |
Allow pg_sslmode argument to be passed into the postgres driver. Keep default argument value to prefer to make it compatible with default postgres value (refer to https://www.postgresql.org/docs/13/libpq-ssl.html)
pg_sslmode can be changed as follows:
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.