could it be, that this pid exist from "before" the update?
you can "enter" a running container as user root executing:
docker exec YOURCONTAINERNAME bash
then ls -l /run/postgresql
when I do that "outside" of a container (in a running ununtu box) I get:
robert@lappi:~/projects/fernuni13/fernuni13/fernuni$ ll /run/postgresql/
total 8
drwxrwsr-x 3 postgres postgres 120 Jan 8 10:57 ./
drwxr-xr-x 37 root root 1240 Jan 12 11:50 ../
drwxr-s--- 2 postgres postgres 200 Jan 12 12:35 11-main.pg_stat_tmp/
-rw-r--r-- 1 postgres postgres 5 Jan 8 10:57 11-main.pid
srwxrwxrwx 1 postgres postgres 0 Jan 12 11:50 .s.PGSQL.5432=
-rw------- 1 postgres postgres 69 Jan 12 11:50 .s.PGSQL.5432.lock
when I do that in a container, that runs nothing but postgres:
root@8fc7b375416b:/# ls -l /run
total 16
drwxr-x--- 2 Debian-exim Debian-exim 4096 Nov 4 2017 exim4
drwxrwxrwt 2 root root 4096 Oct 9 2017 lock
drwxr-xr-x 2 root root 4096 Oct 9 2017 mount
drwxrwsr-x 1 postgres postgres 4096 Jan 11 06:35 postgresql
-rw-rw-r-- 1 root utmp 0 Oct 9 2017 utmp
and
root@8fc7b375416b:/# ls -l /run/postgresql/
total 0
robert
On 12/01/2020 09:29, Mariel Cherkassky wrote:
Hey,
I have a container that runs centos image with a few changes and
postgresql installed on it.
Whenever I start my container or restart it, the postgresql(12) starts
in the following state :
postgresql dead but pid file exists
For example :
[root@my_container_id /]# service postgresql status
postgresql (pid 128) is running...
[root@ my_container_id /]# exit
exit
[root@docker-node]# docker restart my_container_id
my_container_id
[root@ docker-node ]#
[root@ docker-node ]#
[root@ docker-node ]# docker exec -it my_container_id /bin/bash
[root@my_container_id /]# service postgresql status
postgresql dead but pid file exists
It happens since I upgraded my postgresql to version 12.
Does anyone else suffer from the same issue ?