-
Notifications
You must be signed in to change notification settings - Fork 260
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
feat: use allow_alter_system
on Postgres >=17
#4921
Open
armru
wants to merge
6
commits into
main
Choose a base branch
from
dev/4244
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+107
−28
Conversation
This file contains 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
❗ By default, the pull request is configured to backport to all release branches.
|
0c3ab22
to
1e496db
Compare
allow_alter_system
on Postgres 17+allow_alter_system
on Postgres >=17
739d8e4
to
fd5c24b
Compare
leonardoce
approved these changes
Jun 21, 2024
/ok-to-merge E2E tests green |
gbartolini
reviewed
Jun 24, 2024
Closes #4244 Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Tested it with this cluster definition: apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: clapton
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:17beta1-bookworm
instances: 3
postgresql:
enableAlterSystem: false then ran: kubectl exec -ti clapton-1 -c postgres -- psql -c 'show allow_alter_system'
allow_alter_system
--------------------
off
(1 row) And: kubectl exec -ti clapton-1 -c postgres -- psql -c 'alter system set max_connections to 200;'
ERROR: ALTER SYSTEM is not allowed in this environment I then applied this: apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: clapton
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:17beta1-bookworm
instances: 3
postgresql:
enableAlterSystem: true then ran: kubectl exec -ti clapton-1 -c postgres -- psql -c 'show allow_alter_system'
allow_alter_system
--------------------
on
(1 row) The log reported:
I then checked that the kubectl exec -ti clapton-1 -c postgres -- bash Then inside I ran: postgres@clapton-1:~/data/pgdata$ ls -la $PGDATA/postgresql.auto.conf
-rw------- 1 postgres tape 88 Jun 29 18:13 /var/lib/postgresql/data/pgdata/postgresql.auto.conf Version 17 works. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-requested ◀️
This pull request should be backported to all supported releases
ok to merge 👌
This PR can be merged
release-1.22
release-1.23
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.
Closes #4244