let isSystemUsername check all system users #2489
Merged
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.
When one defines a
fes_user
in the manifest and has alsostreams
defined, the database password of this user gets overridden. The secret, however, is not touched. Therefore, removing the user from the manifest immediately fixes the issue.I found that when initializing robot / manifest users the check for name collisions with already defined system users is only done for the configured
SuperUsername
andReplicationUsername
- not for e.g. pooler of stream user. I changed it now to a loop over all system users that are already initialized at this point (not in the unit test though). Because, if this check does not happen, somewhere done the line the database role picks up a new random password.fes_user
will be part of c.pgUsers and override the existing sytem user with the same name in the list ofnewUsers
to sync here and here. Interestingly, I find no ALTER ROLE statements in the Postgres logs (probably because we don't want to log passwords).Btw: The same bug affects the connection pooler role as well.