Re: postgresql doesn't start - Mailing list pgsql-general

From Adrian Klaver
Subject Re: postgresql doesn't start
Date
Msg-id 560EFDCC.1020300@aklaver.com
Whole thread Raw
In response to postgresql doesn't start  (Paolo De Michele <paolo@paolodemichele.it>)
List pgsql-general
On 10/02/2015 02:02 PM, Paolo De Michele wrote:
> hi there,
>
> I've a big problem with my postgresql installation
> I've postgresql 9.3 installed on docker; I start it via supervisord
> I've never had issues with postgresql and I don't touched nothing (no
> update, no changes)
>
> this is my configuration
> there's a file called postgresql.conf in /etc/supervisor/conf.d/
> cat command:
>
> [program:postgres]
> command=/opt/postgresql.sh
> autostart=true
> autorestart=true
> stopsignal=QUIT

If it where me I would change the above to:

[program:postgres]
command=/opt/postgresql.sh
autostart=true
stopsignal=TERM

>
> lookt at /opt/postgresql.sh
>
> #!/bin/sh
>
> # This script is run by Supervisor to start PostgreSQL 9.3 in foreground
> mode
>
> if [ -d /var/run/postgresql ]; then
>      chmod 2775 /var/run/postgresql
> else
>      install -d -m 2775 -o postgres -g postgres /var/run/postgresql
> fi
>
> exec su postgres -c "/usr/lib/postgresql/9.3/bin/postgres -D
> /var/lib/postgresql/9.3/main -c
> config_file=/etc/postgresql/9.3/main/postgresql.conf"
>
> until yesterday there were no problem
> right now I see this in the /var/log/supervisor's directory:
>
> 2015-10-01 21:40:18 UTC HINT:  The file seems accidentally left over,
> but it could not be removed. Please remove the file by hand and try again.
> 2015-10-01 21:40:20 UTC FATAL:  could not remove old lock file
> "postmaster.pid": Permission denied
>
> if I remove this file with sudo permissions when I re-run the process
> I've the same error and I don't understand why. I tried the same
> configuration (postgresql installation and configuration) in another new
> docker installation and works fine.
>
> what's the problem?
> someone help me?
> I've very important databases and I dont' know how to recover it
>
> please let me know, thanks in advance
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: postgresql doesn't start
Next
From: John R Pierce
Date:
Subject: Re: postgresql doesn't start