Thread: Bug #871: FW: How to solve the problem

Bug #871: FW: How to solve the problem

From
pgsql-bugs@postgresql.org
Date:
Derek (derek_cn@sina.com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
FW: How to solve the problem

Long Description
NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend
        died abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am
        going to terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Sample Code


No file was uploaded with this report

Re: Bug #871: FW: How to solve the problem

From
Josh Berkus
Date:
Derek,

> Long Description
> NOTICE:  Message from PostgreSQL backend:
>         The Postmaster has informed me that some other backend
>         died abnormally and possibly corrupted shared memory.
>         I have rolled back the current transaction and am
>         going to terminate your database system connection and exit.
>         Please reconnect to the database system and repeat your query.
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.

Did you KILL -9 one or more Postgres processes?  Then you will get this=20
message, and have to restart the postgresql server to use it again.

IF YOU ARE STILL GETTING THIS ERROR AFTER RESTARTING, then please read the=
=20
following:

This somewhat deceptive message, in my experience, is usually caused by a=
=20
database crash which WAL is unable to easily recover from, such as HDD erro=
rs=20
corrupting the Postgres files.=20=20

Please do the following:
WARNING: The below is provided strictly as volunteer peer-to-peer advice.=
=20=20
Follow AT YOUR OWN RISK.

1) Shutdown PostgreSQL using "pg_ctl -m fast stop"
2) check your process log to make sure that *all* postgres processes are=20
halted.   Give the system some time to shut everything down.
2)a) if you cannot shut down all postgres processes properly, even after 15=
-20=20
minutes, try restarting the system.
3) re-start Postgresql.  Give it some time to attempt to restore itself; 20=
-30=20
minutes may be necessary with a large database and a slow server.
4) Connect to PostgreSQL.  If you get that message again, then you have som=
e=20
kind of serious hardware or OS related problem that Postgres can't deal wit=
h.=20=20
If you connect normally, then everything is OK; skip the rest of the=20
suggestions.
5) Shut down postgres again.
6) Use diagnostic tools to examine your system for: a) Hard drive/controlle=
r=20
errors; b) bad RAM; c) OS errors; d) other hardware issues
7) correct any problems you find through (6)
8) re-start postgres and restore your database from backup (you do have a=
=20
backup, yes?)
9) start using postgresql again.

Good luck!


--=20
-Josh Berkus
 Aglio Database Solutions
 San Francisco