Operator V5 no automatic restart after parameter change

76 views
Skip to first unread message

Mat thias

unread,
Sep 15, 2021, 6:40:34 AM9/15/21
to Postgres Operator
Hi, 
I am currently trying out Operator 5.0.2 and am having problems changing parameters. 
The operator recognises the changes and in the log I see the conversion, but there is no automatic restart of PostgreSQL. I have to manually trigger it in patroni every time. 


2021-09-15 07:17:40,313 INFO: no action. I am (hippo-s3-00-4m8w-0) the leader with the lock
2021-09-15 07:17:40,318 INFO: Changed shared_buffers from 16384 to 1GB (restart might be required)
2021-09-15 07:17:40,319 INFO: Reloading PostgreSQL configuration. server signaled
2021-09-15 07:17:50,888 INFO: no action. I am (hippo-s3-00-4m8w-0) the leader with the lock
2021-09-15 07:18:00,813 INFO: no action. I am (hippo-s3-00-4m8w-0) the leader with the lock

The parameters are correct. 
I have checked shared_buffers and max_connections. 

Platform info: 
Operator: 5.0.2
Openshift 4.7.29

Do you have any idea what I am doing wrong or is it a bug? 
If in doubt, it would be nice to be able to trigger the restart via cluster-definition. Maybe similar to the manual snapshots.

Many greetings  

Jonathan S. Katz

unread,
Sep 15, 2021, 10:06:39 AM9/15/21
to Mat thias, Postgres Operator
Having PGO detect a change that requires a Postgres restart is on the roadmap.

You can trigger a restart by doing the equivalent of the following:

kubectl patch postgrescluster/hippo -n postgres-operator --type merge \
  --patch '{"spec":{"metadata":{"annotations":{"restarted":"'"$(date)"'"}}}}'
This feature is already available. It is more clearly documented in next release as we added an "administrative" section to the tutorial.

Jonathan S. Katz
VP Platform Engineering

Crunchy Data
Enterprise PostgreSQL 


Mat thias

unread,
Sep 17, 2021, 9:01:02 AM9/17/21
to Postgres Operator, jonath...@crunchydata.com, Postgres Operator, Mat thias

Hi Jonathan, 
Thank you for your message and the tip with the annotation. 
The whole thing works, but to be honest I had imagined something different. The annotation restarts the pods (via rolling update), is there an equivalent to the former pgo restart, so that only postgres restarts in the container and the pod remains intact? 

I have to say that PGO V5 is really great. 
You guys are doing a great job

Many greetings

jonath...@crunchydata.com

unread,
Sep 21, 2021, 11:52:37 AM9/21/21
to Postgres Operator, Mat thias, Postgres Operator
Hi Matthias,

Thanks for the feedback. We've added a roadmap item to look into allowing Postgres restarts (even in a rolling fashion) without recreating the Pod.

Jonathan

Reply all
Reply to author
Forward
0 new messages