On Fri, Mar 20, 2020 at 6:17 PM Mike Palmiotto
<mike.palmiotto@crunchydata.com> wrote:
>
> On Thu, Mar 19, 2020 at 4:57 PM Andres Freund <andres@anarazel.de> wrote:
>
> I'm still working on wiring up an AppVeyor instance, as seemingly
> builds don't work on any of the default Azure/Visual Studio images. In
> the meantime, I've fixed some spurious whitespace changes and the
> compile error for non-EXEC_BACKEND. I'm posting a new version to keep
> Travis happy at least while I keep working on that. Sorry for the
> delay.
The attached patchset should be fixed. I rebased on master and tested
with TAP tests enabled (fork/EXEC_BACKEND/and Windows).
The AppVeyor configs that Peter posted in a separate thread were
extremely helpful. Thanks, Peter!
> > When starting a process postmaster would just specify the process type,
> > and if relevant, an argument (struct Port for backends, whatever
> > relevant for bgworkers etc) . Generic code should handle all the work
> > until the process type entry point - and likely we should move more work
> > from the individual process types into generic code.
> >
> > If a process is 'only_one_exists' (to be renamed), the generic code
> > would also (in postmaster) register the pid as
> > subprocess_pids[type] = pid;
> > which would make it easy to only have per-type code in the few locations
> > that need to be aware, instead of many locations in
> > postmaster.c. Perhaps also some shared memory location.
I played around with this a bit last weekend and have a local/untested
patch to move all subprocess_pids into the array. I think
'is_singleton_process' would be a decent name for 'only_one_exists'.
We can also probably add a field to the subprocess array to tell which
signals each gets from postmaster.
Are these pieces required to make this patchset committable? Is there
anything else needed at this point to make it committable?
Thanks again for everyone's feedback and comments.
Regards,
--
Mike Palmiotto
https://crunchydata.com