From: | Mike Palmiotto <mike(dot)palmiotto(at)crunchydata(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Yuli Khodorkovskiy <yuli(dot)khodorkovskiy(at)crunchydata(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Auxiliary Processes and MyAuxProc |
Date: | 2020-03-26 23:30:02 |
Message-ID: | CAMN686G8DqKzc5JP8OHOsN0u3FBQOCBhTrCWnmCiE4G0m-arBQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 20, 2020 at 6:17 PM Mike Palmiotto
<mike(dot)palmiotto(at)crunchydata(dot)com> wrote:
>
> On Thu, Mar 19, 2020 at 4:57 PM Andres Freund <andres(at)anarazel(dot)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
Attachment | Content-Type | Size |
---|---|---|
0001-Add-subprocess-infrastructure.patch | text/x-patch | 14.0 KB |
0002-Use-centralized-StartSubprocess-for-aux-procs.patch | text/x-patch | 14.9 KB |
0003-Add-AutoVacLauncherType-to-subprocess-struct.patch | text/x-patch | 7.5 KB |
0004-Add-AutoVacuumWorkerType-to-subprocess-struct.patch | text/x-patch | 6.4 KB |
0005-Add-PgstatCollectorType-to-subprocess-struct.patch | text/x-patch | 11.6 KB |
0006-Add-PgArchiverType-to-subprocess-struct.patch | text/x-patch | 7.7 KB |
0007-Add-SysLoggerType-to-subprocess-struct.patch | text/x-patch | 21.2 KB |
0008-Add-BgWorkerType-to-subprocess-struct.patch | text/x-patch | 26.4 KB |
0009-Add-Backends-to-subprocess-struct.patch | text/x-patch | 15.3 KB |
0010-Add-WalSenderType-to-subprocess-struct.patch | text/x-patch | 2.0 KB |
0011-Move-to-new-MyBackendType.patch | text/x-patch | 21.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2020-03-26 23:33:21 | Re: error context for vacuum to include block number |
Previous Message | Alvaro Herrera | 2020-03-26 22:49:51 | Re: error context for vacuum to include block number |