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

[PR #400/939c2cd6 backport][stable-1] Fix postgresql_set module if single-value param contains comma in value #403

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jan 26, 2023

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:

ERROR:  SET log_line_prefix takes only one argument

Single-value parameters with possible comma in value are "_command" and "_prefix" that for exmple in v12 are:

  • ssl_passphrase_command
  • archive_command
  • restore_command
  • archive_cleanup_command
  • recovery_end_command
  • log_line_prefix

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
  • Bugfix Pull Request
COMPONENT NAME

postgresql_set

…ue (#400)

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit 939c2cd)
Copy link
Collaborator

@hunleyd hunleyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume you wanted this backported @Andersson007 ?

@Andersson007
Copy link
Collaborator

i assume you wanted this backported @Andersson007 ?

@hunleyd yep, generally we backport bugfixes

@hunleyd hunleyd merged commit 7bb3d13 into stable-1 Jan 26, 2023
@hunleyd hunleyd deleted the patchback/backports/stable-1/939c2cd611e06017e234931afeadaab4a271b973/pr-400 branch January 26, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants