Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMgVm-0031ei-3P for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 03:08:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMgVk-009Unk-Ai for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 03:08:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMgVj-009Uku-Uw for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 03:08:56 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMgVh-000bzG-Cr for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 03:08:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7872A5C01BC; Thu, 20 Jul 2023 23:08:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 20 Jul 2023 23:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1689908932; x=1689995332; bh=+1 cKmAYOu5YjssdWnMP9Sa1X2EyN97/cmgdEUe1CInQ=; b=T1Dk0OJIXE/EV3RTiD oADEUrW4wFH8QMC71R1g0tPW4ZW/MF43XaIWuN3ev8uGMmPKJikJflSeeW6Fu81A EvcJIgk7zlQSlGkC+X7UMbntxl72NibM1vAdymF9L30agVXWdgl3THtGdsDgBMfp 931LwkAC4Nfv+x6l5v81PoAs4Al+zPq9lJK7bsPyW34HeUgLXuTznYKXlrPkPuot mSUJypwddtQWkuyScitd4GmuA+vydCjUDVvrcHGoY08nrDFJVU1fYxxvP+s4r0UR RxcadRVH7K5igh8WtJ9wKRrRj/ZvkhVI0GsKRLDcdGOHxMR/I2LPnF93SU62Ytqi wvYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1689908932; x=1689995332; bh=+1cKmAYOu5Yjs sdWnMP9Sa1X2EyN97/cmgdEUe1CInQ=; b=c1VYszKozqzb/KPdPIlBDY9WppSFU a2RYQZrUXxt88dZUAtkWhSBENYgf6TOgk8GP9Gx2vvZcMdIuEP1FemgYDVejGFPX IGMpEb8QpuFbEDmtBCJ7j07t7Bh21L8gtY4KmvQv3/cns+efvzfDapaPLAfoSyq4 cidPpt/o5CJAg9D6Jmrx91F9/eZhqH4KI9oNwTku5On+WW8bsW0Sp7XE0Jc/FkE4 KoXSG1V0t2Mo8bVP1u3zm8a9SqaBaPL8v42e+xmTv2h4IP0dA3ybfH/Yzlv13xYo 2TvPpxhkAp04Cxa02pnlE+LLSvHdJk3RISzuHqZCP6hFjVUQ4Dy2/e+Qg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrhedugdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 20 Jul 2023 23:08:50 -0400 (EDT) Date: Fri, 21 Jul 2023 12:08:47 +0900 From: Michael Paquier To: Bharath Rupireddy Cc: Masahiro Ikeda , pgsql-hackers@lists.postgresql.org Subject: Re: Support worker_spi to execute the function dynamically. Message-ID: References: <46e53055d8d1c92704d3cd2709c722e7@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AtMo6NJvKIMfWBbP" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --AtMo6NJvKIMfWBbP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 20, 2023 at 03:44:12PM +0530, Bharath Rupireddy wrote: > I don't think that change is correct. The worker_spi essentially shows > how to start bg workers with RegisterBackgroundWorker and dynamic bg > workers with RegisterDynamicBackgroundWorker. If > shared_preload_libraries =3D worker_spi not specified in there, you will > miss to start RegisterBackgroundWorkers. Is giving an initidb time > database name to worker_spi.database work there? If the database for > bg workers doesn't exist, changing bgw_restart_time from > BGW_NEVER_RESTART to say 1 will help to see bg workers coming up > eventually. Yeah, it does not move the needle by much. I think that we are looking at switching this module to use a TAP test in the long term, instead, where it would be possible to test the scenarios we want to look at *with* and *without* shared_preload_libraries especially with the custom wait events for extensions in mind if we add our tests in this module. It does not change the fact that Ikeda-san is right about the launch of dynamic workers with this module being broken, so I have applied v1 with the comment I have suggested. This will ease a bit the implementation of any follow-up test scenarios, while avoiding an incorrect pattern in this template module.=20 -- Michael --AtMo6NJvKIMfWBbP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmS59r8ACgkQnvQgOdby QH1WzA//Xq1r1O8BMYeNCoMwJQU2WZUoLwXRXqp+DNxkh5uOWNGtoLbwOXVcQrhQ aK5YCPUpsyi6sFiHvqX79od2aHDi9oUIA+TxnSt+fPK+HS51cDD6PVnu2aVosOYz fDb7XYksWpOzS5n50bSQ0oYFjgYAnM5/O/pT2giU3XbT1XUGJMqhp3ScShuzwNWa UETprX7SkPja6JwCiaSrSer0A4EDrGWHHor0geqUwwwhYwbogWSOFiM2J+TSJ2vO iJI8CG9hEdOTKtw418e03SLbp1+T3jxhaQZoPOCp0WJSV1Ha/VGp1GiC0IrNKTeV SC8sBiT4Xt2yZsQIaTQaLAc9uk6SdD0VMT3VA6d1kpz2SSKVH3Hgs68WeVIPAaHt Sfe/cu5sJQgWwsE0tYvVS0mBPrdZneBo420OMwlQa6GMOef8b0rKTsCuu00YDTdp a5n9GjOf1HQqoQR51xzHpOMAj3P2lBpJJ3QUEmzGkJDf3+8D3kUjNEnCmxguw3HJ ch7ny6qz7Ppm4t4ECakJHDx8MyAR9VS3NLhAqRxEoL+Gg6siIU0blLL2bUmH2rDO RddT4IxxRBYb3wZPPGN9uAqe5I5KXO6EEJbaprvoftRNCx3smP7Ebe+qbUVtOZGX Ro6UejPxYvDunMmJRJNW2okKWbbzTxhCppLjifLR+ot+JJgSef8= =fwQq -----END PGP SIGNATURE----- --AtMo6NJvKIMfWBbP--