On Monday November 8 2004 6:16, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > A power failure led to failed postmaster restart using 7.4.6 (see > > output below). The short-term fix is usually to delete the pid file > > and restart. > > > > I often wonder why ipcs never seems to show the shared memory > > block in question? > > The shared memory block would certainly not still exist after a system > reboot, so what we have here is a misleading error message. Looking at > the code, the most plausible explanation appears to be that > shmctl(IPC_STAT) is failing (which it ought to) and returning some errno > code different from EINVAL (which is the case we are expecting to see). > What platform are you on, and what does its shmctl(2) man page document > as error conditions?
Platform is Linux 2.4.20-30.9 on i686 (Pentium 4, I think). From man 2 schctl: ERRORS On error, errno will be set to one of the following: EACCES is returned if IPC_STAT is requested and shm_perm.modes does not allow read access for shmid. EFAULT The argument cmd has value IPC_SET or IPC_STAT but the address pointed to by buf isnât accessible. EINVAL is returned if shmid is not a valid identifier, or cmd is not a valid command. EIDRM is returned if shmid points to a removed identifier. EPERM is returned if IPC_SET or IPC_RMID is attempted, and the effective user ID of the calling process is not the creator (as found in shm_perm.cuid), the owner (as found in shm_perm.uid), or the super-user. EOVERFLOW is returned if IPC_STAT is attempted, and the gid or uid value is too large to be stored in the structure pointed to by buf. CONFORMING TO SVr4, SVID. SVr4 documents additional error conditions EINVAL, ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents an EIDRM error condition. ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend