Re: server auto-restarts and ipcs

Поиск
Список
Период
Сортировка
От Ed L.
Тема Re: server auto-restarts and ipcs
Дата
Msg-id 200411081924.31101.pgsql@bluepolka.net
обсуждение исходный текст
Ответ на Re: server auto-restarts and ipcs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: server auto-restarts and ipcs  ("Ed L." <pgsql@bluepolka.net>)
Список pgsql-general
On Monday November 8 2004 6:16, Tom Lane wrote:
> "Ed L." <pgsql@bluepolka.net> 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Can this be indexed?
Следующее
От: "Ed L."
Дата:
Сообщение: Re: server auto-restarts and ipcs