Re: fork/exec patch: pre-CreateProcess finalization - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: fork/exec patch: pre-CreateProcess finalization
Date
Msg-id 200401090507.i09575q13986@candle.pha.pa.us
Whole thread Raw
In response to Re: fork/exec patch: pre-CreateProcess finalization  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: fork/exec patch: pre-CreateProcess finalization
List pgsql-patches
Claudio Natoli wrote:
>
> I wrote:
> > Just to be clear, this would involve turning the BackendList dlllist into
> an
> > array in shared memory, right? If so, a couple of questions:
>
> Bruce Momjian wrote:
> > I assumed a much simpler solution.  I thought we would just have:
> >
> >     struct {
> >         pid_t    pid;
> >         int     cancel_key;
> >     } PidCancel[maxbackend];
> >
> > in shared memory and we would just sequentially scan looking for a pid
> > match?  Is that wrong?
>
> Isn't that basically "turning the BackendList dlllist into an array in
> shared memory"? And I don't think that an array length of maxbackend is
> enough.

Uh, why would you need more than maxbackends?  Can't it be indexed by
slot number --- each backend has a slot?  Maybe I am missing something.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Claudio Natoli
Date:
Subject: Re: fork/exec patch: pre-CreateProcess finalization
Next
From: Tom Lane
Date:
Subject: Re: fork/exec patch: pre-CreateProcess finalization