Re: [ADMIN] could not create lock file postmaster.pid: No such file or directory, but file does exist

From: Cliff Pratt <enkiduonthenet(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [ADMIN] could not create lock file postmaster.pid: No such file or directory, but file does exist
Date: 2014-02-17 23:21:50
Message-ID: CADXosEKrU8k2Zog4Z5_z+Rn_4HtxZjjK2372_gcB8pkScdcafw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

You don't give a lot of information, but try "sudo rm postmaster.pid" or
"sudo -u postgres rm postmaster.pid" if you are sure that postgres is not
running.

Cheers,

Cliff

On Tue, Feb 18, 2014 at 12:07 AM, Rob Goethals / SNP <Rob(dot)Goethals(at)snp(dot)nl>wrote:

> Hi,
>
>
>
> This is my first post to this list, so I hope I am posting it to the
> correct lists. But I am really stuck and getting pretty desperate at the
> moment.
>
> This weekend my database crashed while importing some Openstreetmapdata
> and I can't get it back to work again. It happened before and normally I
> would reset the WAL-dir with the pg_resetxlog command. I would loose some
> data but that would be all.
>
> This time it is somehow different because he doesn't recognize any of the
> important files anymore. For example when I try to start Postgresql again
> with the command:
>
> /usr/lib/postgresql/9.1/bin/pg_ctl -D OSM/ start
>
>
>
> I get the following error:
>
> FATAL: could not create lock file "postmaster.pid": No such file or
> directory
>
>
>
> But when I do a ls -l on the directory I can see the file exists.
>
> drwx------ 0 postgres postgres 0 Jan 24 10:07 backup
>
> drwx------ 0 postgres postgres 0 Feb 14 11:10 base
>
> drwx------ 0 postgres postgres 0 Feb 17 09:46 global
>
> drwx------ 0 postgres postgres 0 Oct 11 10:49 pg_clog
>
> -rwxr-xr-x 0 postgres postgres 4476 Oct 11 10:49 pg_hba.conf
>
> -rwxr-xr-x 0 postgres postgres 1636 Oct 11 10:49 pg_ident.conf
>
> drwx------ 0 postgres postgres 0 Feb 17 11:29 pg_log
>
> drwx------ 0 postgres postgres 0 Oct 11 10:49 pg_multixact
>
> drwx------ 0 postgres postgres 0 Feb 17 08:58 pg_notify
>
> drwx------ 0 postgres postgres 0 Oct 11 10:49 pg_serial
>
> drwx------ 0 postgres postgres 0 Feb 12 09:58 pg_stat_tmp
>
> drwx------ 0 postgres postgres 0 Feb 14 09:01 pg_subtrans
>
> drwx------ 0 postgres postgres 0 Oct 11 10:49 pg_tblspc
>
> drwx------ 0 postgres postgres 0 Oct 11 10:49 pg_twophase
>
> -rwxr-xr-x 0 postgres postgres 4 Oct 11 10:49 PG_VERSION
>
> drwx------ 0 postgres postgres 0 Feb 14 13:37 pg_xlog
>
> -rwxr-xr-x 0 postgres postgres 19168 Oct 11 11:41 postgresql.conf
>
> -rwxr-xr-x 0 postgres postgres 121 Feb 17 08:57 postmaster.opts
>
> -rwxr-xr-x 0 postgres postgres 88 Feb 17 08:58 postmaster.pid
>
>
>
> I cannot perform any action on the postmaster.pid file. I tried cp, mv and
> rm, but nothing works. Is there anything I can do to make the system
> recognize this file again? And get my database up and running? Or is all
> hopelessly lost?
>
>
>
> I have Postgresql 9.1 installed on Ubuntu 12.04.
>
>
>
> Kind regards,
>
> Rob.
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sofer, Yuval 2014-02-18 07:39:54 Postgres service (Windows) running as "local system"
Previous Message Bruce Momjian 2014-02-17 18:25:56 Re: Can't upgrade a DB from 8.4 to 9.3 with pg_uprade: pg 9 not started

Browse pgsql-general by date

  From Date Subject
Next Message Haribabu Kommi 2014-02-18 00:31:11 Re: File system level backup of shut down standby does not work?
Previous Message Laurentius Purba 2014-02-17 22:41:29 Database compare tools