[PR #400/939c2cd6 backport][stable-1] Fix postgresql_set module if single-value param contains comma in value #403
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.
This is a backport of PR #400 as merged into main (939c2cd).
SUMMARY
The PR #357 fix the multi-value parameters management (issue #78), but the new check assumes as multi-value each parameter with a comma in the value, that is incorrect as there are single-value parameters with comma in value.
If a single-value parameter is treated as a multi-value, the 'param_set' function builds an ALTER SYSTEM SET command with multiple comma-separated values, that fails with the message:
Single-value parameters with possible comma in value are "_command" and "_prefix" that for exmple in v12 are:
The most critical (that I add in tests) is 'log_line_prefix' because often it contains comma and a space at the end.
I simply fix the check to evaluate as single-value all parameters that ends with '_command' and '_prefix'.
If the fix is accepted, It can be back-ported also in stable branch.
ISSUE TYPE
COMPONENT NAME
postgresql_set