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 1qMjZ2-0039kc-1u for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 06:24:31 +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 1qMjZ0-00D1Z3-A6 for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 06:24:30 +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 1qMjYz-00D1Yv-SX for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 06:24:30 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMjYw-000dVY-SD for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 06:24:28 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D89DF5C0129; Fri, 21 Jul 2023 02:24:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 21 Jul 2023 02:24:24 -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=1689920664; x=1690007064; bh=43 GtBbBCt8EsDxvTPH7w9HdTJZ8EItzptLoi/NQiRKU=; b=hck6qi3SHYaKZqJmXe zpJDdFdT6pAJG0nMSV6ioImz/nFtkhawuaDDe2y9SYNxSeEWxmVNih0TMMBz2K/c WFGVYoTzs7W6T+l8QgUZk13NhR7R6huOmaTA+3/ZNqZi0dSQ36sb7m9qhLk8tRPh SgiME3mS4Xf+fIpQROX8Nq58hBYKXW6/NxXw2AtzI0gx3j4nSUE1AwhpcLfwClyb l2bsU7ijvKCoHW30oXjmNIwasuzi6oENe2eEp/+Pp81gYqNiOgk9w6/vHShKWglg SWLb1UKpmQCXGhmQirM+z6al/PpRixpVlUTY+gT7qZdUYGKm5qVrVD+yPyiVcwiK CoxQ== 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=1689920664; x=1690007064; bh=43GtBbBCt8EsD xvTPH7w9HdTJZ8EItzptLoi/NQiRKU=; b=oTYE5w7L2uGYqRd4hsgTOxhApu94h dp7mEYdFdCDAWa+qRdWZ0TBYuKbRIA6eEO6IVM0R7nVwiV6A+PQFFyau9SkJZKM5 UHcP5DFiG5lNLq5qqoXv0ydAato43EkROU0moWCK/XurgjpqSDpG+3rLpkfS39Py WK1vjWp3ZGYIsjSLDggD3xdSFDYxu/Z+n3N3dNs3f92aPwKO5ZZDd2AR5wOYzTnS qB/L2S+0GBhFUbrSrs1fEDGsalpkrARmLppeYk/DkUz1hd8EpBL3zTSEIXmoWZDH NtINc3dpBxIpQi4u3Zx3W4tUNmDM75RhpTbbaoUo9maYo5NL5+VMKIJ8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrhedugddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 Jul 2023 02:24:22 -0400 (EDT) Date: Fri, 21 Jul 2023 15:24:19 +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="2IGLA/+jEQEUele+" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2IGLA/+jEQEUele+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 21, 2023 at 11:24:08AM +0530, Bharath Rupireddy wrote: > Okay. Here's a quick patch for adding TAP tests to the worker_spi > module. We can change it to taste. What do you think if we removed completely the sql/ test, moving it to TAP so as we have only one cluster set up when running a make check? worker_spi.sql only does two waits (one for the initialization and one to check that the tuple has been processed), so these could be replaced by some poll_query_until()? As we have a dynamic.conf, installcheck is not supported so we don't use anything with this switch. Besides, updating shared_preload_libraries and restarting the node in TAP is cheaper than a second initdb. - snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i); - snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi"); + snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi static worker %d", i); + snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi static worker"); [..] - snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i); - snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi"); + snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi dynamic worker %d", i); + snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi dynamic worker"); Good idea to split that. -- Michael --2IGLA/+jEQEUele+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmS6JJMACgkQnvQgOdby QH0M5w//a6PT1Xgv76JtNS/p13E6M0baZT8rioao+zXImfvgeYfl9laCfN3UotVt Wxm20bVq/REs1VuEn2X0tOBut9j2gxxKIvhaZGC9IxJZ81SDqJ1Ze0CN3jxscOEs 7YVP0jNaYlJsP32b/hzLHBvTSO0lzhT/zg6Wvv12pjg00kYwMgszJ+38x/lLScsd mEozsm5lfCWiKtukxdk9esNTOBNawGvqovnWY9KCE7tLYV/s7iubTHNRHPKVdJZZ QobjEMX+8WQCQ0drFYeNlEys5oZ32OdGZAEH6IgVLsHRF3gKnfsYoA1Gdm4L9z6v ujNDdVFFVW/0OlgzN9zNAJnNCJJlhRqfz1Odvv05VaTnbz3WapB+709yAWtgADKV xbCkhlSSQ/fWBC0yozvPVvE7x1YaqOVZaacgnMZEIL6nR4AXuV/86WdYBTvSJmI8 McZs+wabQFGfllM42NESnzkeS++BCsHsMFToXsuxs7PSuvAYaTzSIWDWLcGdpww5 rAK0Ub9JXbn+Glr2u1VbuhltQX9yEJ/EMwtAs7KIHxEdK71YJZE/iqzPT1oDgSA9 pYTMbWehufAnJjsBrZrwKFN912N599J+43ECWuOJMfZ8fLy2J5QspQR31qi223QN qHgiJkSHxNNep9CfoOcN8DQ8WBX7uz/+e4SCzoClHcsphmvhu/o= =2gzD -----END PGP SIGNATURE----- --2IGLA/+jEQEUele+--