'How to update max_connections in postgresql deployed on Kubernetes pod
I want to update the max_connection count in /var/lib/postgresql/data/pgdata/postgresql.conf file, postgresql database is deployed in the form of pod. There is no vim present inside pod to update the file, nor I could modify the Dockerfile to install vim, as I don't have access for that. Also I have tried adding the args and command in the deployment.yaml file
containers:
- name: postgres
image: postgres:latest
args: ["-c", "max_connections=500"]
still no luck for it.
Solution 1:[1]
- You can use
sedto edit this file? - Some helpfull options on this thread
Solution 2:[2]
Just increasing max_connections is bad idea. You need to increase shared_buffers and kernel.shmmax as well.
Kindly refer to this SO answer here for more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | William Leite Araújo |
| Solution 2 | Piotr Malec |
