This could be because of data corruption caused by a computer crash. Please try reindexing your database by going to Start -> Programs -> PostgreSQL -> Command Prompt. In the prompt, write "reindexdb -a" and press enter. This process might take a while if you have large databases.
i was having the same problem so I tried everything else in this thread and others, then decided to go for this and I get this message:
'reindexdb -a' is not recognized as an internal or external command, operable program or batch file.
any suggestions?