pmm icon indicating copy to clipboard operation
pmm copied to clipboard

in pod postgres doesn't restart after node switchover during Kubernetes upgrade

Open raschidb opened this issue 1 month ago • 0 comments

Description

Hello,

We noticed multiple time that during a kuberntes upgrade the statefullset pod executing postgres doesn't restart after switching to another node because the pid file /srv/postgres14/postmaster.pid is still present. Is there a way to fix that ? (will a preStop command be executed ... ?)

log : 2025-11-29 13:51:41.095 UTC [942] FATAL: lock file "postmaster.pid" already exists 2025-11-29 13:51:41.095 UTC [942] HINT: Is another postmaster (PID 17) running in data directory "/srv/postgres14"?

Thank you Rachid

Expected Results

Statefulset pod can switch to a node without manual action to delete pid file

Actual Results

perconna pmm crash due to a kubernetes upgrade

Version

PMM server 3.3.1

Steps to reproduce

upgrade kubernetes version (rancher rke2)

Relevant logs

2025-11-29 13:51:41.095 UTC [942] FATAL:  lock file "postmaster.pid" already exists
2025-11-29 13:51:41.095 UTC [942] HINT:  Is another postmaster (PID 17) running in data directory "/srv/postgres14"?

Code of Conduct

  • [ ] I agree to follow Percona Community Code of Conduct

raschidb avatar Dec 01 '25 10:12 raschidb