Re: Possible Corrputed shared memory - Mailing list pgsql-novice

From Tom Lane
Subject Re: Possible Corrputed shared memory
Date
Msg-id 12245.1438438398@sss.pgh.pa.us
Whole thread Raw
In response to Possible Corrputed shared memory  (James Sebastian <james.sebastian@gmail.com>)
Responses Re: Possible Corrputed shared memory  (James Sebastian <james.sebastian@gmail.com>)
List pgsql-novice
James Sebastian <james.sebastian@gmail.com> writes:
> I attempted application stop and database shutdown using init scripts
> followed by start.
> The database failed to restart with the following error.

> 2015-07-30 14:14:17 IST LOG:  received immediate shutdown request
> ...

> The whole recovery took more than 2.5 hours to complete to come back to a
> state to accept connections back. This caused considerable disruption in
> normal service.

If you use "immediate" mode shutdown, then yes, crash recovery is what
will ensue.  Think of that as being like the large red panic button that
dumps the fuel rods out of a nuclear reactor: you push that button only
when disaster is otherwise certain, because recovering will be slow and
expensive.

For an ordinary clean shutdown, you use "fast" mode, or "smart" mode
if you're not expecting any long-lived client sessions.

(If you're using a wrapper script that defaults to "immediate" mode,
I'd advise changing that default.)

Also, if it took that long to recover, you might have raised the
checkpoint interval settings too high.

            regards, tom lane


pgsql-novice by date:

Previous
From: James Sebastian
Date:
Subject: Possible Corrputed shared memory
Next
From: James Sebastian
Date:
Subject: Re: Possible Corrputed shared memory