I recently had to replace my postgresql.conf file, and I thought I got the settings right, but when I try to run Postgresql, I get this error:
ESTFATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory
My workaround is to go as root and create a folder called postgresql in /var/run and then change the owner of the folder to postgres.
The biggest problem is that I need to do this every single time my computer starts, the folder somehow deletes itself.
I tried commenting out the external pid file bit in the conf file, but that didn't change anything.