Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've been working with postgres on a linux server for the last couple of months. Last week, half of our servers crashed and my one with them. I was in the middle of uploading data to the postgres database with osm2pgsql when this happened. After we revived the server, postgres has stopped working.

commands:

service postgresql start (Alternatively, /etc/rc.d/init.d/postgresql start, same thing happens)

Starting postgresql service: [ OK ]

service postgresql status

postmaster dead but pid file exists

Trying to start the postmaster using

su postgres

postmaster -D /var/lib/pgsql/data

yields nothing either.


As for the pid file, /var/run/postmaster.5432.pid exists, and when I remove it then the status changes to "postmaster is stopped", but if I try to start it again:

service postgresql start

Starting postgresql service: [FAILED]

If anyone has any idea what I could do to get it working, where the problem might be etc, I would be overjoyed to have an answer. What really gets me is that oit was working until last week, I even rebooted a backup and nothing seems to have changed, I'm really at my wuit's end with this problem!

share|improve this question

migrated from stackoverflow.com Jun 2 '13 at 16:37

This question came from our site for professional and enthusiast programmers.

    
Stop! step away from postmaster.pid! Don't do anything more right now. –  Craig Ringer Jun 2 '13 at 12:21
    
Other detail you need to provide: The file system in use; the type of disk storage on the server; details of the disk models if you're using SSDs; if you're using hardware RAID, whether write-back caching was enabled; whether you're using LVM; whether you're using software RAID; if you're using ext3/ext4, what mount options you're using; etc –  Craig Ringer Jun 2 '13 at 12:30
1  
Finally, while it's likely nothing's wrong, depending on a lot of the details we don't have yet you should assume DB corruption until you know otherwise. Read: wiki.postgresql.org/wiki/Corruption –  Craig Ringer Jun 2 '13 at 12:33
1  
When the server quits immediately, it normally leaves some error messages in the server log, which is syslog or a file depending on the configuration. You need to consult this log. –  Daniel Vérité Jun 2 '13 at 21:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.