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

switch to connection strings instead of separate connection parameters #255

Closed
8 tasks done
pashagolub opened this issue Aug 9, 2023 · 1 comment · Fixed by #322
Closed
8 tasks done

switch to connection strings instead of separate connection parameters #255

pashagolub opened this issue Aug 9, 2023 · 1 comment · Fixed by #322
Assignees
Labels
epic Large body of work broken down into a number of smaller issues

Comments

@pashagolub
Copy link
Collaborator

pashagolub commented Aug 9, 2023

Pros

  • connection strings are flexible and long time supported
  • one can use either key-value or url format
  • one can omit any part of connection string, e.g. user, host, etc.
  • one can use multi-host strings, e.g. postgresql://host1:123,host2:456/somedb
  • one can specify any custom connection parameter, e.g. synchronous_commit
  • the host part may be either a host name or an IP address, e.g. postgresql://[2001:db8::1234]/database
  • it's easier to store in the back-end and manipulate

Cons

  • users should know how to use it (not a valid reason, because pw3 is not a newbie thingy anyway)

TODO

  • remove single connection options, e.g. host, post, etc.
  • add configuration kind type: url, file, folder
  • update config validation
  • update GetPostgresDBConnection()
  • update main.go
  • update patroni.go
  • update database schema
  • update UI
@pashagolub pashagolub added the epic Large body of work broken down into a number of smaller issues label Aug 9, 2023
@pashagolub pashagolub added this to the Connection strings milestone Aug 9, 2023
@pashagolub
Copy link
Collaborator Author

@denys-holub would you please fix the UI part. To keep things simple:

  • delete all connection edits
  • replace them with only one memo with title "Connection string"
  • rename "Password encryption" to "Encryption"
  • remove SSL tab completely

image

We will try to add syntax highlighting and other features later

pashagolub added a commit that referenced this issue Dec 6, 2023
closes #255 (#322)

* [+] replace single connection options with `--config`

* [!] switch configuration to connection string from separate parameters

From now there is only one command-line parameter `--config` to specify
every possible kind of configuration to read, e.g. `--config=file.yaml`,
`--config=postgresql://user:pwd@host/db?statement_timeout=5`, etc.

From now encrypted not only password but the whole connection string
(if specified).

* [*] update environment variables description

* [*] WebUI updated 

---------

Co-authored-by: Denys2002Holub <paloma20022001@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large body of work broken down into a number of smaller issues
Projects
None yet
2 participants