Re: Restart after poweroutage - Mailing list pgsql-general

From Tom Lane
Subject Re: Restart after poweroutage
Date
Msg-id 8442.1173814085@sss.pgh.pa.us
Whole thread Raw
In response to Re: Restart after poweroutage  (Jon Lapham <lapham@jandr.org>)
Responses Re: Restart after poweroutage  (Jon Lapham <lapham@jandr.org>)
List pgsql-general
Jon Lapham <lapham@jandr.org> writes:
> chdir("/var/lib/pgsql/data")            = 0
> open("postmaster.pid", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EEXIST (File
> exists)
> open("postmaster.pid", O_RDONLY)        = 3
> read(3, "2809\n/var/lib/pgsql/data\n  54320"..., 1123) = 45
> close(3)                                = 0
> getppid()                               = 4150
> kill(2809, SIG_0)                       = -1 ESRCH (No such process)
> shmctl(32768, IPC_STAT, 0x7fffd6144e00) = -1 EIDRM (Identifier removed)

Oh, that's interesting.  The code is barfing on this because

        /*
         * Otherwise, we had better assume that the segment is in use. The
         * only likely case is EIDRM, which implies that the segment has been
         * IPC_RMID'd but there are still processes attached to it.
         */

It would seem that maybe your kernel has a different idea of what EIDRM
means than we do.  You say this persists across a reboot?

            regards, tom lane

pgsql-general by date:

Previous
From: Jon Lapham
Date:
Subject: Re: Restart after poweroutage
Next
From: Jon Lapham
Date:
Subject: Re: Restart after poweroutage