Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI3oS-0001Ds-7C for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Mar 2021 06:19:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lI3oR-0001z6-3u for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Mar 2021 06:19:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI3oQ-0001yz-UH for pgsql-bugs@lists.postgresql.org; Fri, 05 Mar 2021 06:19:46 +0000 Received: from [64.147.123.20] (helo=wout4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI3oO-0003lQ-Ru for pgsql-bugs@lists.postgresql.org; Fri, 05 Mar 2021 06:19:45 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1470B359; Fri, 5 Mar 2021 01:19:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 05 Mar 2021 01:19:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=SYTXzHLwHumw+6boJVdrWfwPXJD s8h1xNuu2G9IQmgg=; b=ufgf2XYdJCeYIplGN470wlY4000dzuU66/yIT9VKhjG V72/R+OIO6tlhMkrTLqpGakIA9dZvIDlxBWoraylBMApgWeKu1Uh9KZww+8n9a7g 97mFHQHO9kemg8Fx8NsFESGiu264js46Vk7ddRsfprp+luj4F4jJMGBnu2w0Qc5K 1ZOcGHODNHWsgF43LYnPcbLtaehAYkW/l60gh/fBysaTfit/ZF931xVhHqluYuk/ na0U94qP6fKi4jX4WYWD8oa/ZMMc14Bgj5p1awQxRgmwaoyFRBhbajIedqNTayTK i2i7FmGno+MbBtu4vq/IP9fej4rRvBRphF1yu2URPmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=SYTXzH LwHumw+6boJVdrWfwPXJDs8h1xNuu2G9IQmgg=; b=fLNS7DwJ/crUdBmDil3U7z +7FRC9wsOi4ri3JaVUL75QzDIk1XAV/x8eTEJ8AMgAM+VyY7hajGO8lfBfsH1O4s rkFGcWeX2gJLtfQqt3efSv1TwsiSGSFS13/l+nghBjTSOgBqzYO16HRrjC/ZYVoj HrL9Po3tw8ik0/92gZoOxiQIAMxmVZMbtJc8EBADrNY7A73S5Sc//HaxPMqfSr6L H5nJgQ5m4+MlDVQSwNoXGyjSYy23UE/KrGs/D6R48cROGtf3EVm7s3DP5vLB5OZB GCxq3H8xH2R8Ss8POpdP1aHtvZD9RsCiKr5zAGncurVMGxeqqZeMTOxl0P/qFDjg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddthedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A3691080054; Fri, 5 Mar 2021 01:19:29 -0500 (EST) Date: Fri, 5 Mar 2021 15:19:26 +0900 From: Michael Paquier To: Tom Lane Cc: Alvaro Herrera , r.zharkov@postgrespro.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set. Message-ID: References: <20210304211356.GA21621@alvherre.pgsql> <1418361.1614896097@sss.pgh.pa.us> <1443266.1614922963@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N14vlzzP8Vy1OUZ7" Content-Disposition: inline In-Reply-To: <1443266.1614922963@sss.pgh.pa.us> X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.20 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --N14vlzzP8Vy1OUZ7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 05, 2021 at 12:42:43AM -0500, Tom Lane wrote: > Yeah, the fact that bgw_main_arg is declared as Datum is really kind > of a lie, because the only thing that actually works there is a pass > by value datatype (not that our docs tell you so). Exactly. > We could stuff the database name into bgw_extra perhaps, but that > seems restrictive as well. I wonder if there's a reasonable way to > pass over a struct of caller-defined size. Or we could just rely on a custom memory context that dynamic workers could use to store their data? It could be simpler IMO to just merge together bgw_main_arg and bgw_extra, then pass down the whole as an argument of the main routine of the bgworker, say with a buffer of 256 bytes for example. I am not sure that workers really need that much for themselves at startup out of GUCs, but I may be wrong :) -- Michael --N14vlzzP8Vy1OUZ7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBBzW4ACgkQnvQgOdby QH2iXxAAgEN3lN2Ab5D5iyLGubm+i8RhYMtvJZN+SVHnWHs/apM3Gq1tIS1cSlU5 uZBzefNJWkp9JCFLyw92YMtGEOwUzJpduAtlcKFMkTGqRv5xBWR8EWtfR7yGXKEB z4FOuvZYyOwPxZ4wBHtdJheWlohYm3LLZrUu/0Q+JHSQuWmOwfQjh9YbUTsGH1SV y3NtA0ugj+fxRSyB01/bOokglO2Kfn2La1LimIiK5CPfsGH69NHerblZzDw41nPv BDOLcUlNSV6MkIzP2XRaisnJnjtntp9d+37P1rNA5EHD5WmgAK/IK5fUyf0rjoge s4L4uxp4iHTS7CMdy7T7deLSmBFXsOC4YLijdVdam4z8BTLoc7xKLylAaDXkf1SZ wTVgNNFJ3hTuUWO33b7dnJ2WSX85ne1eAGlH0fkCMXlGVFebbFfLCubPwKGXG2aM Lxv/XXD6rXAZFf3yAuVgL8At5VrAMQci/3kH7k3INo5K6ji1vU2X7fhebYPTZwGb 5Dc916EnmHYrYJ7ShkUdvQSLMhtOVg/5Bos/JtRjfWI/6kRauc+BghNkeGdrGg0K fZxM0cQEjlVTovoymBdGmtLcFXaFMlMg7htDppdG/lbrj9jxJYDF2StELLYjJNmO KqwovqpTEpj9gO0vQEFZxCWrHqRwIBmRjN9AeABA+zPgHbza7vM= =ScZn -----END PGP SIGNATURE----- --N14vlzzP8Vy1OUZ7--