Postgresql – Computer restarted and Postgres 9.2 service cannot be started

configurationpostgresqlpostgresql-9.2startup

My firewall is down and when I tried to start the Postgres service it gave me an error that said: the service started and then stopped. Some services stop automatically if they are not in use by other services or programs.

I need to start postgres for pgadmin and when I tried to connect to pgadmin it gave me an error that I've seen before but none of those conditions of the error is true because it worked right before my computer was automatically restarted.

I honestly didn't want to change my conf file and simply do it from the pgadmin postgres.conf gui.

The console also gave me an error about a line that had debug assertions =, which I put a hash mark to the left of which got rid of the error.

When I try to run postgres from the command prompt it gives me that postgresql.conf contains errors? But what errors would they be?

I also tried running from the console a couple of different ways and one of the errors I got was pg_ctl: could not start service "postgresql-9.2": error code 1063

enter image description here
enter image description here
enter image description here

Best Answer

  1. Start by commenting out the offending line in your postgresql.conf and retry. It is possible that a change made some time ago caused this problem and you are only now seeing it because a reload operation or similar failed, and so PostgreSQL was running on old configuration. If that works address what you have on that line (maybe get rid of the quotes?)

  2. If that doesn't work, take a look elsewhere in the file. Maybe you have an unterminated quote somewhere?

It really looks to me like you have a bad postgresql.conf file and that's why it isn't starting.