RE: [HACKERS] More postmaster troubles

Поиск
Список
Период
Сортировка
От Daryl W. Dunbar
Тема RE: [HACKERS] More postmaster troubles
Дата
Msg-id 000001be577d$f47d1840$1445e59b@ddunbar.eni.net
обсуждение исходный текст
Ответ на Re: [HACKERS] More postmaster troubles  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: [HACKERS] More postmaster troubles  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Thank you Tatsousan.  This patch will solve the dying process
problem when I reach MaxBackendId (which I increased from 64 to
128).  However, I do not know what is causing the spiraling death of
the processes in the first place. :(

Is there some place I should be looking for other patches, besides
those listed on www.postgresql.org?

Thank you for your continued help.

DwD

> -----Original Message-----
> From: t-ishii@ext16.sra.co.jp
> [mailto:t-ishii@ext16.sra.co.jp]On Behalf
> Of Tatsuo Ishii
> Sent: Saturday, February 13, 1999 1:03 AM
> To: Daryl W. Dunbar
> Cc: pgsql-hackers@postgreSQL. org
> Subject: Re: [HACKERS] More postmaster troubles
>
>
> > Solaris7 on a Sparc20 running 6.4.2.  Occasionally
> (once or twice a
> > day) under a very light load, brain-dead child
> processes begin to
> > accumulate in my system.  If left unchecked, eventually
> the parent
> > process runs out of resources and dies, orphaning all the lost
> > processes.  (Now that I have solved the semaphore
> error, it appears
> > to be the backend limit of 64 processes.)
>
> Have you installed following patches? This solves the
> problem when #
> of backends reaches MaxBackendId. I'm not sure if your
> problem relates
> to this, though.
>
> -------------------------------- cut here
> ---------------------------
> ***
> postgresql-6.4.2/src/backend/postmaster/postmaster.c.orig
> Sun Nov 29 10:52:32 1998
> --- postgresql-6.4.2/src/backend/postmaster/postmaster.c
> Sat Jan  9 18:14:52 1999
> ***************
> *** 238,243 ****
> --- 238,244 ----
>   static long PostmasterRandom(void);
>   static void RandomSalt(char *salt);
>   static void SignalChildren(SIGNAL_ARGS);
> + static int CountChildren(void);
>
>   #ifdef CYR_RECODE
>   void        GetCharSetByHost(char *, int, char *);
> ***************
> *** 754,764 ****
>                    * by the backend.
>                    */
>
> !                 if (BackendStartup(port) !=
> STATUS_OK)
> !
> PacketSendError(&port->pktInfo,
>
>     "Backend startup failed");
> !                 else
> !                     status = STATUS_ERROR;
>               }
>
>               /* Close the connection if required. */
> --- 755,771 ----
>                    * by the backend.
>                    */
>
> !                                 if (CountChildren() <
> MaxBackendId) {
> !                     if
> (BackendStartup(port) != STATUS_OK)
> !
> PacketSendError(&port->pktInfo,
>
>     "Backend startup failed");
> !                     else {
> !                         status =
> STATUS_ERROR;
> !                     }
> !                 } else {
> !
> PacketSendError(&port->pktInfo,
> !                     "There are too many
> backends");
> !                 }
>               }
>
>               /* Close the connection if required. */
> ***************
> *** 1617,1620 ****
> --- 1624,1655 ----
>       }
>
>       return random() ^ random_seed;
> + }
> +
> + /*
> +  * Count up number of chidren processes.
> +  */
> + static int
> + CountChildren(void)
> + {
> +     Dlelem       *curr,
> +                *next;
> +     Backend    *bp;
> +     int            mypid = getpid();
> +     int    cnt = 0;
> +
> +     curr = DLGetHead(BackendList);
> +     while (curr)
> +     {
> +         next = DLGetSucc(curr);
> +         bp = (Backend *) DLE_VAL(curr);
> +
> +         if (bp->pid != mypid)
> +         {
> +             cnt++;
> +         }
> +
> +         curr = next;
> +     }
> +     return(cnt);
>   }
>



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

Предыдущее
От: Oleg Broytmann
Дата:
Сообщение: Re: [HACKERS] VACUUM ANALYZE problem on linux
Следующее
От: Tom Lane
Дата:
Сообщение: Failures in 'rules' regression test