-
Notifications
You must be signed in to change notification settings - Fork 90
Use dynamic memory for connection strings handling. #323
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…, dump , restore and snapshot commands
…minor refactoring
Arrange to share more code from cli_common, and in passing introduce a new structure to handle the bytes and bytesPretty within a single unit.
Make the internal parsing APIs use dynamic memory, and then keep a single instance of the connections strings, safe versions of them (without the password), and the password separated in-memory.
Lazily compute the SafeURI when needed only.
dimitri
added a commit
that referenced
this pull request
Jun 20, 2023
We want to grab the password and remove it from the connection string so that logs don't contain it, and we set the password in the environment of the child processes when running pg_dump etc commands. Fix the code so that's what actually happens. See #323.
dimitri
added a commit
that referenced
this pull request
Jun 20, 2023
We want to grab the password and remove it from the connection string so that logs don't contain it, and we set the password in the environment of the child processes when running pg_dump etc commands. Fix the code so that's what actually happens. See #323.
dimitri
added a commit
that referenced
this pull request
Jul 11, 2023
dimitri
added a commit
that referenced
this pull request
Jul 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It turns out that Postgres interface libpq export MACONNINFO but does not uses it really. Switch to using dynamic memory for all our needs around connection strings, including print-safe variants (without password).
Replaces and fix #311.
Fixes #292.