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.

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

share|improve this question

migrated from gis.stackexchange.com Dec 21 '12 at 19:33

This question came from our site for cartographers, geographers and GIS professionals.

3  
Can you post the text of the errors? I take it you're on Windows? –  R.K. Dec 21 '12 at 15:06
    
yes, well the problem is that I can't copy and paste the errors as they are in separate windows –  Carl Carlson Dec 21 '12 at 15:23
    
Have you modified postgresql.conf? If so, what about using the backup you made before modifying? –  Jay Laura Dec 21 '12 at 16:51
    
I didn't make a backup. I basically just placed a hashmark to the left of debug assertions. –  Carl Carlson Dec 21 '12 at 17:07
    
what's on line 574? And I'm pretty sure you shouldn't use both double and single quotes for the log_line_prefix. Try removing the double quotes from line 392 –  a_horse_with_no_name Dec 21 '12 at 23:36
add comment

3 Answers 3

It seems that postgresql doesn't like your postgresql.conf file. The log message clearly says that it wasn't expecting a " character on line 392, but it doesn't tell you which one (of two " on this line) is it.

I would assume that there is an unclosed " earlier in the config file.

share|improve this answer
    
This worked for me. I reverted back the changes done in pg_hba.conf and it restarted! –  pongapundit yesterday
add comment
  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.

share|improve this answer
    
Well I did a comparison between the line when it worked and when it didn't and there is no difference. I also didn't perform any manual changes. I checked all the quotes. –  Carl Carlson Jan 22 '13 at 19:23
    
Right, but the error message pretty clearly implicates the postgresql.conf so that is really where you need to be troubleshooting. If the file hasn't changed in a while and the computer hasn't been restarted in a while it is quite possible that a reload event failed, and the changes to the postgresql.conf that caused the problem just didn't take effect. So start there. If you can reproduce the problem even after commenting everything out of the conf file, then it is time to look elsewhere, but not until then. –  Chris Travers Jan 23 '13 at 5:58
add comment

I had a similar problem which I resolved by going to the Postgres service in Computer management. In the properties for the Postgres service, Click on the tab 'Log On' and select 'Local System account' then Restart the Postgres service.

share|improve this answer
    
no, unfortunately that didn't work as 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. To restart it, it would have to allow me to start it first. –  Carl Carlson Dec 21 '12 at 16:25
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.