Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jEsWv-0005xC-SG for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 10:36:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEsWu-00054c-7l for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 10:36:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jEsWt-00054U-2z for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2020 10:36:00 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEsWj-00067j-D0 for pgsql-hackers@postgresql.org; Thu, 19 Mar 2020 10:35:57 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 742DA5C0121; Thu, 19 Mar 2020 06:35:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 19 Mar 2020 06:35:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ZoOhQSwqqpPtUlh1SZFPyiJm8llb9S7gPuck0Co0b Qo=; b=hiXrHQdTbsWX291ZwQRlMY9f7gZUFkuScSXxQWnWAZ55LaXYfd9FgJYfW H1fHN0/rWIWmiNLlUlV9uuuzEeSDOCugfPbKEaoXU036LfzWCtAhkA2+i0sdOxSB E3VFVEkJ1/PUQu1R0aki/N2fmiNHA1uAe4Vj0Bt24ha5GvY+pOUJdBNbaerwlIZO kkFxdOidimQWu2r/rPike7vVVoeoRBRlnqQ+eamdcsEvc/UeDjiY9/up9zx1rhD9 sTmjISZxz7YueoJ2aUxb5xXvoqUUoS9LDXqpkcgY+bzeIJG7uMGO4GVXkchaR3Nt b/qBIxYAcv7VZvgIp95H94xnmbSTQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefledgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpegtphhuthhusggvrdhorhhgpdgr phhpvhgvhihorhdrtghomhdpvdhnughquhgrughrrghnthdrtghomhenucfkphepleefrd dvgedvrddvudefrddvgedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqhhurggurhgrnh htrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p5df2d5f1.dip0.t-ipconnect.de [93.242.213.241]) by mail.messagingengine.com (Postfix) with ESMTPA id C1E48328005E; Thu, 19 Mar 2020 06:35:42 -0400 (EDT) Subject: Re: Auxiliary Processes and MyAuxProc To: Mike Palmiotto , Justin Pryzby References: <20200317215218.GC26184@telsasoft.com> <20200318010433.GA17520@alvherre.pgsql> <20200318141720.GH26184@telsasoft.com> Cc: Alvaro Herrera , Michael Paquier , Andres Freund , Yuli Khodorkovskiy , Tom Lane , pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 19 Mar 2020 11:35:41 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-03-18 17:07, Mike Palmiotto wrote: > On Wed, Mar 18, 2020 at 11:26 AM Mike Palmiotto > wrote: >> >> On Wed, Mar 18, 2020 at 10:17 AM Justin Pryzby wrote: >>> Also, I saw this was failing tests both before and after my rebase. >>> >>> http://cfbot.cputube.org/ >>> https://ci.appveyor.com/project/postgresql-cfbot/postgresql/builds/31535161 >>> https://ci.appveyor.com/project/postgresql-cfbot/postgresql/builds/31386446 >> >> Good catch, thanks. Will address this as well in the next round. Just >> need to set up a Windows dev environment to see if I can >> reproduce/fix. > > While I track this down, here is a rebased patchset, which drops > MySubprocessType and makes use of the MyBackendType. While working on (My)BackendType, I was attempting to get rid of (My)AuxProcType altogether. This would mostly work except that it's sort of wired into the pgstats subsystem (see NumBackendStatSlots). This can probably be reorganized, but I didn't pursue it further. Now, I'm a sucker for refactoring, but I feel this proposal is going into a direction I don't understand. I'd prefer that we focus around building out background workers as the preferred subprocess mechanism. Building out a second generic mechanism, again, I don't understand the direction. Are we hoping to add more of these processes? Make it extensible? The net lines added/removed by this patch series seems pretty neutral. What are we getting at the end of this? More specifically, I don't agree with the wholesale renaming of auxiliary process to subprocess. Besides the massive code churn, the old naming seemed pretty good to distinguish them from background workers, the new naming is more ambiguous. Btw., if I had a lot of time I would attempt to rewrite walreceiver and perhaps the autovacuum system as background workers and thus further reduce the footprint of the aux process system. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services