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 1qPUAO-00BAk7-94 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jul 2023 20:34:28 +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 1qPUAM-001J7i-Ns for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jul 2023 20:34:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPUAM-001J7a-Ex for pgsql-hackers@lists.postgresql.org; Fri, 28 Jul 2023 20:34:26 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPUAG-000wZh-2O for pgsql-hackers@lists.postgresql.org; Fri, 28 Jul 2023 20:34:25 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id D329B320079B; Fri, 28 Jul 2023 16:34:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 28 Jul 2023 16:34:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=1690576457; x=1690662857; bh=Tj aRVwVvMmMGzPG9yNnWMcO8B8CCiu4+R1xxLhhKroE=; b=fNpJAR9c2DwgjUrVTA WiHhmmNvaV42BPRldDyhlTLsyDRUn66cQAWIWmMOy3cQ6AqSIC+hCH81BwNe8JVX VF/P5wV0a2AeOC4DDPyvI00F/p5we0mRCHyGTzAfKyMH6UlImxTt/Y9CuPNTIDr0 qQyRrUg1sOXyytrugVc/GQXMIuOIjxGtwUALellTwkGM/h/Zrk/rV3mIOnBjPR2t aLf8M752zaRogpQ5pG69QokynfqjMf5uu/KksjparawSHShSVRpQU0amYh80nJuo ZQqUIojEnCS0D/pE9UKXT79cztwmOW0fy7LUogW616M4WVhUng9Fg5RRcW3zL8UY A7pQ== 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=1690576457; x=1690662857; bh=TjaRVwVvMmMGz PG9yNnWMcO8B8CCiu4+R1xxLhhKroE=; b=u2dfIz8pn6SZa9EqZbbGQvhx7PvuN Yh2ZBhuMIiqCsQwPdJfPTywjJ93RfjEE6MYJYplFsDIUrHwfuEpqUg1ESnm2cNk1 EtTIqClMas5xq8biTXs4AyDqHbb0QPd+nwWvq1A2NGiy6VitF2mcfmTufeACvZxK kzIpiq5eGRK6i+SGa2QraEpO/xBPkdsr/tYoVdE0NcCnT3vSCp9K6JftSGlKubK1 41+J6oh+4J7hDQ+35rsYX4NRCtoAUbJt06+AygNYq2v5X0JFJLtW+qeFqYDQiOk+ RumJza/ZdOsvYU0+bh2sI5O4shnF4OMip28Pdu9Ojj/WUrHXfUGUMl/5w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrieeigddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Jul 2023 16:34:16 -0400 (EDT) Date: Fri, 28 Jul 2023 13:34:15 -0700 From: Andres Freund To: Michael Paquier Cc: Bharath Rupireddy , Masahiro Ikeda , pgsql-hackers@lists.postgresql.org Subject: Re: Support worker_spi to execute the function dynamically. Message-ID: <20230728203415.m6sw4ulpfnixtfin@awork3.anarazel.de> References: <46e53055d8d1c92704d3cd2709c722e7@oss.nttdata.com> <20230728022332.egqzobhskmlf6ntr@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-07-28 13:45:29 +0900, Michael Paquier wrote: > Having each bgworker on its own schema would be enough to prevent > conflicts, but I'd like to add a second thing: a check on > pg_stat_activity.wait_event after starting the workers. I have added > something like that in the patch I have posted today for the custom > wait events at [1] and it enforces the startup sequences of the > workers in a stricter way. Is that very meaningful? ISTM the interesting thing to check for would be that the state is idle? Greetings, Andres Freund