Re: Auxiliary Processes and MyAuxProc

From: Mike Palmiotto <mike(dot)palmiotto(at)crunchydata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, 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-04 04:56:26
Message-ID: CAMN686EbWG4bXvsdctoKrJAsPWjCddsmk4fQ5iY6g=PMmoDH4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 2, 2020 at 9:53 AM Mike Palmiotto
<mike(dot)palmiotto(at)crunchydata(dot)com> wrote:
>
> On Sat, Feb 29, 2020 at 9:51 PM Mike Palmiotto
> <mike(dot)palmiotto(at)crunchydata(dot)com> wrote:
> >
<snip>
> Okay, here is an updated and rebased patch that passes all regression
> tests with and without EXEC_BACKEND. This also treats more of the
> issues raised by Andres.
>
> I still need to do the following:
> - split giant patch out into separate functional commits
> - add translated process descriptions
> - fix some variable names here and there (notably the PgSubprocess
> struct ".progname" member -- that's a misnomer.
> - address some valgrind findings
>
> I should be able to split this out into smaller commits sometime today
> and will continue iterating to scratch the other items off the list.

I've addressed all of the points above (except splitting the base
patch up) and rebased on master. I didn't squash before generating the
patches so it may be easier to read the progress here, or annoying
that there are so many attachments.

This patchset hits all of Andres' points with the exception of the
reshuffling of functions like AuxiliaryProcessMain, but it does get
rid of a lot of direct argv string comparison. I'll reorganize a bit
when I re-write the patchset and will likely move
AuxiliaryProcessMain, along with the Backend subprocess functions but
just wanted to get this up here in the meantime.

There is quite a lot to be gained from this patchset in the form of
re-organization and removal of redundant code-paths/globals. I see
this as a good first step and am willing to continue to push it
forward with any new suggestions.

Thanks,
--
Mike Palmiotto
https://crunchydata.com

Attachment Content-Type Size
0008-Rename-subprocess-init-to-prep.patch text/x-patch 5.8 KB
0011-Use-MyProcPort-instead-of-adding-ConnProcPort.patch text/x-patch 4.9 KB
0007-Translate-descriptions-and-drop-unused-fields.patch text/x-patch 5.9 KB
0010-Update-StartSubprocess-comments.patch text/x-patch 1.4 KB
0009-Move-Backend-specific-code-down.patch text/x-patch 9.1 KB
0006-Fix-up-subprocess-init-logic-and-docs.patch text/x-patch 2.1 KB
0005-Drop-MyBackend-and-handle-backend-fork-failure.patch text/x-patch 10.8 KB
0003-Rearrange-subprocess.c-headers.patch text/x-patch 1.3 KB
0004-Fix-allocation-of-MySubprocess.patch text/x-patch 1.0 KB
0002-Get-rid-of-pstrdup-for-fork-exec-args.patch text/x-patch 772 bytes
0001-Introduce-subprocess-infrastructure.patch text/x-patch 103.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-03-04 04:58:32 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Fujii Masao 2020-03-04 04:48:12 Re: Some problems of recovery conflict wait events