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.96) (envelope-from ) id 1wWfzQ-002mYo-17 for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2026 19:50:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWfzO-003pBn-01 for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2026 19:50:26 +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.96) (envelope-from ) id 1wWfzM-003pBe-39 for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2026 19:50:25 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wWfzK-00000001jh8-1uW5 for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2026 19:50:23 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4DEF0140012A; Mon, 8 Jun 2026 15:50:21 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 08 Jun 2026 15:50:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1780948221; x= 1781034621; bh=gFVJAO/emYKzj3AK5EUdcqDp789f6M68PheNeYVpc8c=; b=V EQl/0LpqMekLb2eLhqcIHseIvVFojbh3zlOyGEOhglsfZ32ek6/+4CVXK7E10frl LoFtegbECSEoo+o2pbhZBsTHTfJHLA585MPWscuZl2fE7LGm5cI/G86POToIy6C3 KDBfOqDVF1lvDlonv/vxJosxr0q4Z2sSoPtPybZOjCZ0ZbBcQkuOx8+eT+ae+ENO j+KP3oyFGPXnAyN6bdobkSIe66uAKNI7Zc4ssJSX2bWqe8FHBp3p6gXn7evfclxl DFULwV8dUcQgiPPeim4uwz5DGOL02CfTYsJXkxDrF3bRsfzBbiVNeP2MssLxtWLz PdaBbVxbDvhsEAz9Yp2vQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1780948221; x=1781034621; bh=g FVJAO/emYKzj3AK5EUdcqDp789f6M68PheNeYVpc8c=; b=XsMin4Bvi0on6lpI1 yV9dU2zBdbqux5k3xaR2PdjOvC8MJ30puhHvMmzu126jtE6C4xeTdmdQrZcXnDnM zrq2Snk5omU2x84dHbx9dWWp0ELd2+QjbI9VMuy5WuGXwi3ohhxW0kONp3ANEokN DGU263fxu3bRLMVrRESiFCfx6ffEw2wdapU58+lVqSIi6pBinPLPVFHW+V9Sprpn YVW7VwmnYPGyMWbJSdy9EUGpVte57yao95klh1c/jQ2w6GxG+iSqOYXEVhZE9YVl O5QBZwTJbq4HUDTNVCfh9SjAEdG2Y+ViON72PYK09lxI61uiPcDSv4A1ec+OODgG Cgzew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEUXu6RDVR+kxQsb5XPTdYpQvxCaDLG7u8m+hmyw7+uJJuiFeIENZuMKPyQyoZqlN veY0nhaRf1O0QlKsqBUG5cMzccB07/vyjXRHfAEqHmO6pw/CZmGwJez0bqhWFye2Er2DZF LhL8css9fEAVPRSTp51I708CuuPwqoP37ikoUN/odh6BkB31BcQociXeLHpLvfDKEMyB9W stFGN3dITx+ORlPL8O4JfqQnwO7oQwpAW35x9MzfL6y3MwWq1QqDS21hbsMnfr9K5an0VC hj5acC7uiRrvnMftGYed8dUHXSnMblklTs63ThZkTi5v7xihGOFeiWtZQD/7AfTqxDT6AT WMwpo8JsHCrv9c4rHt3/7PQ8sE9a5BpI9iZqKTwVM7O4GYBaSWhVgDVumZDXcanmguYSje buwoPuoVk7o7YDbqWTvCgHi5F20d+/OmzE7bxveWxF3U+elegPf4sgVa3xzr2vJmhvA3sh Jp5K4lbR/kheQxM0xxtA9g6uXqU+ZWriw2iCTvZtC2L9Zol2Woe2JnSoEqzmwH8jGV5fdF 8bhDAVC8tS9EiYlRVVgJ9MvdOVAigeTfT2tQCrWGyQhOpEhbN6tllNvwiAzKbgIL9mooqa WgFYPfvge8siA+Ug8J9d2vBOJig/M1uu9nR2vGKZIt3hzY1E/6tEHdnvw81A X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 15:50:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1780948216; bh=rgJpjlH0iX6ODNwV6mcqllhIxdIAgMc0DecQJ6qjBts=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Z7bM1KSlHlywFDpskS9IsgwXxXk+PebnGRep7ncXlqbUKwQPsosSSG6dYt319Uemy lJqyg1C991oQgHO9RGSsPzhZfES1qkkjfwBoQNrT0qcVOjxLJennsUafhf2PSOSUih /azZgHv69411pC7ZW3D0IGP/ONjDQua4ivRK6s+HTgx4S8fUmrJufmNvp9bHC5XAMV Mu8GIaiJT6wk5dMDWnirzTnJZQX6b9CemuNe1+d/PLgymueIf6wNwsYtijeNE3+7ZD eHpl9KETcDdJMmixfCcalfLoThs+jBMVLO4qUflXlIJU5nhWhSGcmZBEzCpF2xZJDW mqkEIXj6/8u2g== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 6AD39B0065B; Mon, 08 Jun 2026 21:50:16 +0200 (CEST) Date: Mon, 8 Jun 2026 21:50:16 +0200 From: Alvaro Herrera To: "Zhijie Hou (Fujitsu)" Cc: Antonin Houska , Srinath Reddy Sadipiralla , "n.kalinin@postgrespro.ru" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qnq35le53r53khhg" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --qnq35le53r53khhg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2026-Jun-05, Zhijie Hou (Fujitsu) wrote: > I have no objection to the proposed approach. But I would like to confirm > whether reporting an ERROR in the startup callback (when the context is not a > REPACK decoding worker) is considered acceptable. > > Like: > > repack_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, > bool is_init) > ... > if (!AmRepackWorker()) > ereport(ERROR, > errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("this plugin can only be used by REPACK (CONCURRENTLY)")); Hmm, yeah, that works for me, we can ditch the magic number then. I'm considering something like the attached. I added the test case and edited nearby comments. Will stare some more at it tomorrow ... -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ --qnq35le53r53khhg Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=v2-0001-Disallow-direct-use-of-the-pgrepack-plugin.patch