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 1w2FpM-00080Z-1j for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:50:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2FpL-00DWTa-1C for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:50:19 +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.96) (envelope-from ) id 1w2FpL-00DWTR-0G for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:50:19 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2FpI-00000000Up7-28ft for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:50:18 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-38a46657a9fso45490501fa.1 for ; Mon, 16 Mar 2026 14:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773697816; cv=none; d=google.com; s=arc-20240605; b=bR4oyG5ar6cXVqva2CnpTEfn+uNPQWxsvCM1NZTL2qRHblmq2yWnBSXAhZbK3/8Uxx woGQK1YTDSF18am6ugLxef2T4f/6XqRGA9HeSfLWTDji8p/pfFOfjg5k04cbxQbfmMQ2 O5ZN420q+nZ9QlZbLuB1k1iT6SG12RZhMzdDrCBPfu4Lw9TYwrYvtQV8L5f+B9ANFsNL U1viPxSlWl3qyjGzuuDKc6UdXY5mq3nBeOwgDszSaGHbU8ZbNerYAn2kJrpYocQ92nPA a91JI+ijG2A7trwKAjzrhOmteKiotxDlWOnffXlEZhYyPQFAOi+reZCTqjBMszFOIR2m SgnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=/X9qwb7dlJx+lKmxy68M3d7FhF+oc0a5C3EVSoWUoao=; fh=qTgXsFxeaWcfJZrycGihBaoD2gE4EY6ZWaXczhGMBzw=; b=gMCLAgs+E4UEd0Fy3RkmILwQLIVoplh0hnCFbxGaOFcO9b2HuZLTc8s+LoyKCAiyC7 pfBwLI8IC5dalQaZ34FrhkOe0KEtTSXHNQ0gmAa4ip0j4APeLAgnHCUGSQuSSP+zWcC6 YbgGMCnSIS+6lEsUYoFwwHuOniAzQrZqCp6f8LaJrCus0ywm5u6Wj//604Q6LXwx6kkD qGJfHrSQFIfCe8VOPbewWYrpVaHUIC0OMcm0/mtrqOh7pPpRyBhraF+XACYgVFNMUNXG ednciCrqZ1Tf783fDSHRJN2XwAr4pkcOPVzBDLaj/vTuud8hv9zGo1svWspp6EZrmWD4 6nrQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773697816; x=1774302616; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/X9qwb7dlJx+lKmxy68M3d7FhF+oc0a5C3EVSoWUoao=; b=NUIEdHTa67m6yJS2jABToTNpjQC4RT3YjhSQ8zGY4NgJNJoZHvp1YSkXPxvgrndzNO Hf+QsCBBjjRvNCTkvkL6RI55abXygBA4QH1YnqH/HTsKva0KZSeuJwe9k0cIFKibTg8u z3pKZFVIo5/dpQ3kZlAysCrwkOXDCRNiKEXoNvXXu/kAxbaQ16DdZMW03ys5Dh4A6c7N jagVfWwtOvg55iTP9AmReHwTZoGWkHTLvprB0DCVUx8xBUNkHcj6u0YAoIgKEjHZ16RD SrcU2IJbsEUuOvh7TEEx7lyFSWl7JiDSqIYXGgu0xgSvqw4klqcxEBREYQXVigKdySmM s4nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773697816; x=1774302616; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/X9qwb7dlJx+lKmxy68M3d7FhF+oc0a5C3EVSoWUoao=; b=tSHib8H0qKyLCu0qXfC1h992YBv3QK+8aw+byzjczegRbVedoz4oNSeyAUovE6vVne W/wgSJ5+i1JhVQfzrSKIak+bMl9C5XDw09cANN5/WfmqbdWn9BbNiHI7Eh2GqXKDnKkT ofRfamcaT6PPw6iokFXASY0SruiWHXFPII5IhG5OiJV4z7520jHd7HHungXsP1BG5s68 I8yCzJdDLiA4JckZU4mNzS7P0/JmVo1ysb8GDplT2vVW329f5h+p4we1IHuxenUqISTh jIRGg2WXLMYkrJ2Fcm2u0P/KGpMiAqaSHjQEHb1911Ff4KbuC1xK4Yy6EG8dFoYvhduC F8hA== X-Forwarded-Encrypted: i=1; AJvYcCXcZUevfJbOIhR6XYiO+5rxBaX5mY1piQAH6L8k86K6stG7rv1kUnCnBK1BC2HmYXF272VE2BLiz+K/RUpH@lists.postgresql.org X-Gm-Message-State: AOJu0Yx0ydhNkhR2I4skkWkCIj0pmrhDWUUzXdZX8XMpmjm3dJ/dlURv 96yO3RLtj+umltLTgtnpka+YpFD4IlFv9XGZlDrGqZwNrpcS2y2mdP9kRdKUbedl/GLtm4LohxV vuaaHY5wRu4yfOiHIZmFBHlEO/fvt7zN8I16e X-Gm-Gg: ATEYQzw4oxvKXRx8mMTituA3fU5Mkw3YBTdqEDhT0opbc9+PvALPjmzDswCaewIfojZ WVtR8u9/e7Lp0s4w06gJ1FArmEWbKXPZPmGs0iWxLJePWp8rhf/UfzJv52mFzxVpJmxRoqOHxk0 57N8tWJ4O9x8EjTiMINfMYuqOnh7uJMvBFnvqAbx+m3m58Z+QyY06VS3IjaC9eV/7dcuboGX8DF tJAPn7bi947FJ/WXxpk/i9Li6eouPrbYMUsQ+RAK7rbM1V477tJbRNad9iFcTZLUMzpL9Z2Z5IT Aq1PDlvOw0XPLf3shlx6gSvnLzwgUDnD2JISZGy2T6BCInYeRcub02qM7EF8EGvN/xqJgKNCtIS aLEn6wiy+ecw6Gvs= X-Received: by 2002:a05:651c:88b:b0:38a:2c06:a270 with SMTP id 38308e7fff4ca-38a8977e8d7mr46372981fa.30.1773697815721; Mon, 16 Mar 2026 14:50:15 -0700 (PDT) MIME-Version: 1.0 References: <202603161503.oft3hnonplyi@alvherre.pgsql> <107398.1773692114@localhost> In-Reply-To: <107398.1773692114@localhost> From: Matthias van de Meent Date: Mon, 16 Mar 2026 22:50:04 +0100 X-Gm-Features: AaiRm53A9o4x2odjYNAfYdF5Y54qvZeAMMrw01KzIX9_U61D3y6HYY1qoVBFAwc Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Mihail Nikalayeu , Pg Hackers , Robert Treat Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 16 Mar 2026 at 21:15, Antonin Houska wrote: > > Matthias van de Meent wrote: > > > I agree it's not user-friendly, but that's the point of limiting > > permissions. Users can't install c-functions without SUPERUSER, > > because it can cause cluster instability and crashes. Users can't > > create slots without REPLICATION, because they'll be able to > > negatively impact the whole cluster's performance, and possibly, > > stability, when taking up replication slots that otherwise would be > > used for critical HA purposes. > > I thought these attributes exist primarily for security purposes. Well, yes, but operational security is also security, right? > If > non-SUPERUSER user could install C-functions, it'd be easy to install code > that leaks data. Yes, as long as they're able to find the right primitives in the available binaries. That's certainly possible, but a bit more work than just none. > REPLICATION is currently the only way to limit access to the > the publisher's data as there is no ACL for publications. > And regarding resources, the REPLICATION attribute alone does not pose a limit > on resource consumption unless you limit the total number of sessions of all > the REPLICATION users at the same time. True. It's not great. And we also don't really have a (good) distinction for logical/physical replication permissions either... > Anyway (fortunately?), the concurrent use of slots by REPACK is limited > because, during the initialization of logical decoding, the backend needs to > wait for all the transactions having XID assigned to finish, and these include > the already running REPACK commands. See SnapBuildWaitSnapshot() and callers > if you're interested in details. Huh, so would you be able to run more than one Repack Concurrently in the same database? ISTM that would not be possible, apart from possibly a mechanism comparable to the SAFE_IN_IC flag (to not wait on those backends). Kind regards, Matthias van de Meent Databricks (https://www.databricks.com)