PostgreSQL Error: server closed the connection unexpectedly

pgadminpostgresqlpostgresql-9.0

I cannot connect to PostgreSQL server from PgAdmin III , so I get this error:

Error connecting to the server: server closed the connection
unexpectedly

This probably means the server terminated abnormally before or while
processing the request.

I get the same error when I try connecting from psql.

I have got this error 2 days ago but after restarting the computer the problem disappears , but this time I have restarted it too many times vainly.

I'm using PostgreSQL 9.0.5 on windows 7 with ArcSDE 10.1 (Arcgis Spatial Database add-on), I have deactivated the antivirus and firewall.

I have tried to reinstall PgSQL but the problem persists.

How I can connect to my Pgsql service and get rid of this error?

Best Answer

It looks like broken data file or broken indexes. If this problem grows, then it can shows some deep system problems - problems with hw (memory, CPU), os (antivirus)... Try to use a commands executed from command prompt for database access repairing a) reindexdb - refresh all indexes, b) pg_dump - recheck a readability of data files.