Repository navigation
feat: allow users to disable ALTER SYSTEM - #3535
Merged
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Contributor
|
I have tested it locally. By default this is the behaviour: Then, once I add: I get this: I manually changed the file permissions and noticed that with the next reconciliation loop they were restored. |
With this patch we disable writes on the `$PGDATA/postgresql.auto.conf` file, effectly preventing users from using ALTER SYSTEM. The old behavior can still be requested by setting the `.spec.postgresql.enableAlterSystem` field accordingly. Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
leonardoce
force-pushed
the
dev/cnp-4392
branch
from
December 13, 2023 10:10
2157907 to
2e867e6
Compare
leonardoce
marked this pull request as ready for review
December 13, 2023 10:11
leonardoce
requested review from
armru,
fcanovai,
gbartolini,
mnencia,
phisco and
sxd
as code owners
December 13, 2023 10:11
Contributor
Author
|
I changed the patch to set |
gbartolini
force-pushed
the
dev/cnp-4392
branch
from
December 13, 2023 11:05
11e126c to
a4c6bac
Compare
Signed-off-by: Gabriele Bartolini <[email protected]>
gbartolini
force-pushed
the
dev/cnp-4392
branch
from
December 13, 2023 11:37
a4c6bac to
f6c4cab
Compare
Signed-off-by: Marco Nenciarini <[email protected]>
Member
mnencia
approved these changes
Dec 13, 2023
Member
|
/ok-to-merge all E2E green, both with default off and on |
armru
approved these changes
Dec 13, 2023
cnpg-bot
pushed a commit
that referenced
this pull request
Dec 13, 2023
Introduce the `.spec.postgresql.enableAlterSystem` to enable/disable the usage of the `ALTER SYSTEM` command for a PostgreSQL instance. Internally, the operator disables writes on the `$PGDATA/postgresql.auto.conf` file when `.spec.postgresql.enableAlterSystem` is set to `false`. For back compatibility, the default is `true`. Closes: #2725 Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit d96b3bb)
mnencia
added a commit
that referenced
this pull request
Dec 13, 2023
Introduce the `.spec.postgresql.enableAlterSystem` to enable/disable the usage of the `ALTER SYSTEM` command for a PostgreSQL instance. Internally, the operator disables writes on the `$PGDATA/postgresql.auto.conf` file when `.spec.postgresql.enableAlterSystem` is set to `false`. For back compatibility, the default is `true`. Closes: #2725 Signed-off-by: Leonardo Cecchi <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit d96b3bb)
4 tasks done
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
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.
Introduce the
.spec.postgresql.enableAlterSystemto enable/disable the usage of theALTER SYSTEMcommand for a PostgreSQL instance. Internally, the operator disables writes on the$PGDATA/postgresql.auto.conffile when.spec.postgresql.enableAlterSystemis set tofalse.For back compatibility, the default is
true.Closes: #2725