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 1wUt1K-001W7Q-0M for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jun 2026 21:21:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUt1I-003StA-2d for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jun 2026 21:21:00 +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 1wUt1I-003St2-0B for pgsql-bugs@lists.postgresql.org; Wed, 03 Jun 2026 21:21:00 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wUt1G-00000000yEi-0RNE for pgsql-bugs@lists.postgresql.org; Wed, 03 Jun 2026 21:20:59 +0000 Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id AB359EC010B; Wed, 3 Jun 2026 17:20:56 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Wed, 03 Jun 2026 17:20:56 -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=1780521656; x= 1780608056; bh=aXIgpNgac/oMQRnCFRUlq5DgaE19lmGD6Gcj19bShNM=; b=l raogToWabWyU2rjduc+xzwRTWPXm94XGiZSKXB2F8hPt6+3Q/C2AZQjvrzB5DQxr qLo25TRsu/m8rnNHl1yZJX2g4GKrYZneUIiOO/IM/z9XDi3oym6WTHAHZ04IhRwX ED+ZVUglE0SA9nu8cGhf155PvPTWnOrZS4bjRuBw4DuMe55uxjkNKnFAC0cKsWkQ 9ifpSmrMf/iMlfxjwOAUKMdM2oWUvFcZZgW4quZ84O8iJQNovdR5S8S9TLuscoUP ufIe8loNNBsXxNuf1jxEJOv58yQdwkFG/sGCt/SlXLr8neQssk3meRqNbt8EhNLi 8esARscsxx5wSoYa6oH7w== 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=1780521656; x=1780608056; bh=a XIgpNgac/oMQRnCFRUlq5DgaE19lmGD6Gcj19bShNM=; b=irCFH2kbPNjurW+wY KvoJJbIWevf2v5DTdq+R4aycCG5olKsq+2JDEGw+wtGCsBy8eN9rCzl3AGQdzd5t m64awbXsLqslLP9HIJloP1y8Yr5IUiGxXzzy9E41XubvhODkwsc4RMpE2e6frnDu zwuiMMMowh98h43t7EZRgKaYgacO96gCAlEDwkpy0YwBQp87VIL+ZVlYviyXSKzG fqKjvCewNXEhNENI3CeRvce+KcTCoWw7RF27YtQMyh+m5zOWUG5A57CyXeuXjSZt 4n7iFd6VabgYldMpE+6MUUELDJM9CrqB7EUGqnfLxi4aYCj6ODhjKZrTkfGvgY4F TeAmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGKfwc/eCbpUuIpzXV6uWZeHZszGfZ4cYjxTUQ53PZ8cqIAxIALcTk6Yp9tdzOqxa SvpUlBRz17uVHesZE4nw2WOh7JmOLL9DNAOdRQzbyvmEBlcnWd08Ko1WMhYKJLXN+Yt0Ho /JmPjJIi/inogHYiKlhpSnXdqsd8Y4snu7iXcdk11PxYA0jdofc9kEJKurfhRSW/sfavNz gbeS+CkeEgkSOeRe7khI3kj7m1qJNrE0dgZ/Mlw6E6suHQZKsVhY2Li4aSHMORYI8NfjeT PFJEYXlkjBWOFBVsBwyl6TeUtUU9XIXkh29YkdVI3oDlMl6bQB0uJT23vIwFx5o2yCzWQz 4Ar8/qSM54SpdWDy1zfMpURavEBEntBbWMwbWS2iWYHWxBVvn1hEcGf8pZ4BBpGXS+jMC7 gF51NKzAvaYfcgCB0agovBz3436oTb4DF4Wl7jtYKVdn6l+M/Soth5syj+o3FQ8cc7BQ/8 XHQf3UBCPJEpgKJ88LpiFaDHqDWQSRAwCf4NQk2rABSr8oQP9e65w3RzjJB7aNmG0eK/TO t0GTvYucZknmye46ryNJ3dFC1EMclrNf83SDpx6xBBdIvMhLU1dQho1abf+0i5qf005rzt //j4+qGTqUs8puoB6CdPctlJ/SQAsJmc7PX4ZzbA6Kzs3EHeMjfkv+2WVq7Q X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Jun 2026 17:20:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1780520576; bh=naF+OrqaK+2JJQTkmPkF+vI3iFx/yP7og2MXFQzBN2E=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=bHwzoYI2KhClNxQaem7dk2IQqg90vsyYnWsl6EntZie6Gi9fc8OpsGl2c5eFw5Qyq ggarIv35SwDs4oWfNVQH/hnSRa1WkjtzWNOhsAbsPza+f47ah7mubeC05ocfgoex/K YIVgEXCooB0OyWeMqfcvj2nG5GMIIVjPgdeipkYrpevuU6Auqsl4WLlf2bzefb1bMH INBzmk+w94CTWgoM3MxxeEIz3qFKvDl6lrfJP9jxtNHvJFfjwjx0scl7cOwI9hrCmP YFHYKoQ2I4N4dj7ddgpI/hILAur0o6P/cbl/5J6Wc3fRfPfWcJhNH07jNJGdRW7Mym LGQsws1YIrZbg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id EC015B00662; Wed, 03 Jun 2026 23:02:56 +0200 (CEST) Date: Wed, 3 Jun 2026 23:02:56 +0200 From: Alvaro Herrera To: Antonin Houska Cc: 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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <33766.1780471821@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Jun-03, Antonin Houska wrote: > Srinath Reddy Sadipiralla wrote: > > > Could we reject the pgrepack plugin at slot creation instead, in > > pg_create_logical_replication_slot() and the CREATE_REPLICATION_SLOT > > command, so misuse gets a clear "reserved for REPACK (CONCURRENTLY)" > > error up front, before any decoding? REPACK creates its slot directly via > > ReplicationSlotCreate(), so it's unaffected, and the begin-callback check > > with magic guard can stay as the internal safety net. > > Happy to be told this isn't worth special-casing :) > > Another possible approach: restrict the use of the plugin to the REPACK > decoding worker. I don't like either of these approaches, because they are forcing the generic facility (either slot creation or logical decoding setup) to know something about one specific user of the facility. That is to say, the restriction is being added on the wrong side of the abstraction. I know my implementation the drawback you (Srinath) mentioned, because the abstraction doesn't provide us with a great way to inject an error report at the exact spot we need it; but I think it's at the correct side of the abstraction. (I'm not really sure that there _is_ a great way to throw an error report at the right time. That would require every single output plugin author to add a function we can call; and every single one of them, except REPACK, would do nothing. This seems quite pointless.) I frankly don't have a problem with letting a transaction spill a few GBs to disk only to then report an error that pgrepack is being misused. It's just not something that anyone would do for fun. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/