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.
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.Goethals@xxxxxx> wrote: