Re: [HACKERS] Re: Reducing sema usage (was Postmaster dies with many child processes)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Reducing sema usage (was Postmaster dies with many child processes)
Date: 1999-01-31 01:45:23
Message-ID: 199901310145.UAA01565@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I said:
> > Any thoughts about which way to jump? I'm sort of inclined to take
> > the simpler approach myself...
>
> A further thought: we could leave the semaphore management as-is,
> and instead try to make running out of semaphores a less catastrophic
> failure. I'm thinking that the postmaster could be the one to try
> to allocate more semaphores whenever there are none left, just before
> trying to fork a new backend. (The postmaster has access to the same
> shared memory as the backends, right? So no reason it couldn't do this.)
> If the allocation fails, it can simply refuse the connection request,
> rather than having to proceed as though we'd had a full-fledged backend
> crash. This only works because we can predict the number of semas
> needed by an additional backend -- but we can: one.

If they asked for 64 backends, we better be able go give them to them,
and not crash or fail under a load. 64 semaphores is nothing.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-01-31 01:52:42 Re: [HACKERS] Reducing sema usage (was Postmaster dies with many child processes)
Previous Message Bruce Momjian 1999-01-31 01:42:56 Re: [HACKERS] Reducing sema usage (was Postmaster dies with many child processes)