First time I have seen the following error when trying to rebuild.
2022-10-04 14:39:49.780 UTC [1700] FATAL: lock file "postmaster.pid" is empty
2022-10-04 14:39:49.780 UTC [1700] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
I can obviously read the hint but not sure how to proceed. Can anyone offer insight?
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
57c2a0746e93 local_discourse/app "/sbin/boot" 6 months ago Up 16 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp app
2022-10-04 15:26:43.452 UTC [1699] FATAL: lock file "postmaster.pid" is empty
2022-10-04 15:26:43.452 UTC [1699] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
This is happening cause the build process thinks PG is already running so maybe something about the PG upgrade process is astray. Can you include full logs of launcher (scrubbing out passwords) so we can see what is up.
If I stopped the app, I’d expect to see no lockfile at that location, and no postgres processes running. (I would, of course, need to run the ps command directly on the host, because the container would no longer be running.)
In your situation, I think that’s what I’d do first: stop the app and check that no postgres processes are running. It seems possible you have two instances running which are colliding with one another.
It’s unlikely, but also possible the disk has filled and that’s why the lockfile is empty. Or perhaps there’s a permissions problem somehow.
Edit: inside the container, the lockfile has a different location and ownership:
# ./launcher enter app
x86_64 arch detected.
# ls -l /shared/postgres_data/postmaster.pid
-rw------- 1 postgres postgres 92 Nov 15 16:20 /shared/postgres_data/postmaster.pid
# exit
logout
#