Re: postgresql doesn't start

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Paolo De Michele <paolo(at)paolodemichele(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql doesn't start
Date: 2015-10-02 21:57:32
Message-ID: 560EFDCC.1020300@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2015-10-02 22:03:51 Re: postgresql doesn't start
Previous Message John R Pierce 2015-10-02 21:20:21 Re: postgresql doesn't start