Home > front end >  How to update max_connections in postgresql deployed on Kubernetes pod
How to update max_connections in postgresql deployed on Kubernetes pod

Time:03-18

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.

CodePudding user response:

  1. You can use sed to edit this file?
  2. Some helpfull options on this thread

CodePudding user response:

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.

  • Related