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 1w2DYl-0005x1-2R for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 19:25:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2DYj-00CHQr-1g for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 19:25:02 +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 1w2DYj-00CHQi-0i for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 19:25:01 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2DYh-00000000TeP-11XI for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 19:25:01 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-38a43f1f978so45417641fa.3 for ; Mon, 16 Mar 2026 12:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773689097; cv=none; d=google.com; s=arc-20240605; b=eNbrGr/JhY0Ln+6Y2XKdEE/PveubwwDFEPJcqVWAOhJ33KEKCUJ/AR2JNb5kpAiI7J zoTvMZgi2zNBgqQd+NaF6LYHG/dlthoozkjTnfgIl/SG0lxr2E9Hr2wPk6FDPc/NyFLt IBqeBwS60dP++nwTlyeVfIxYpBvUI3o+kz5emAC2CapqYiP4Atj+6k3HH1ANhaahY1dZ mU6ieOmChPtPkiYMdTIRsIgXvnp3v2+weC0tDe4ou0Y4ZrlARZtWAs83WPfRTekvh/yV aZlHqFZnGO2ViRdnj7YyRnPpXpjw6n6lsbE+Xwv1iL+n8hsgIyqcieH1Ge0cS8PUBgrr ezLA== 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=UzfEOBRm8UYF5Bud6TQ+nwZEwcGRj3L2iCe9ZCoZ5BA=; fh=eB0FkVtApkUh9Dqftv7kHGMl9fRbb1+NHaXqtgt05Kw=; b=SlDmMu+BADb1xhw3XrgRBYmulWN8QUFQ6DtdTLfX/9OX1bvqCcWR5h0dJSaJB0bfGM 7BZm3gBkVjAwC5IUFd82Ve/IrmeSs29sQ22GtG77PayXUssi1/lgm3jVqhBTBbXQR0yn lyJ3492jerjf7DA32DbuCcCVhHyN0MyD9uIiZ1ABDEEGqlqD7DJS7gTzHhf+Tfd7B4Aw bDVBl7cYd5qzgbNNFfzjQW+U5/fi7Sc6lsneI0DMIEqw7xfjAwC1DIQyqQgJf+e1Dvyq NjUp4fI8oVEeJ4rSWcF6Au1Tp27/r0+/r5XpE8EsGfRhTOJRNlVBOKOWvLGLrFkxZaGJ OrwA==; 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=1773689097; x=1774293897; 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=UzfEOBRm8UYF5Bud6TQ+nwZEwcGRj3L2iCe9ZCoZ5BA=; b=KTeNc9t54JUpa2DfO4iClAVAehQNTvxoPHFmRgStp/SB9vpO5Mmcsgu39NMaA4xyuT HTfGIRXMsgkmiV/KPgZrQur2dUfeR2+MrvuizIcFsq55QZMLa3426mjZE1hSCwv5UnwP 7wxGEzSE/8PkIVXYPGt2nkkCQa6tjfksh038xPKPmV5qt2pNGrwDwFBNNOp6aFEXbCff /751m2VbqCxLb8I5qFzqNlxHxqX8BIlvb9u64Fo+ToKt+i1k/jkavvBsgd6gaNpz2oxA jEAvA5fGPiKcfAZOKUbUuvQks/7z4gq04L47zEcd3NVgDcHwO7ETAFW9obky48gcmRry 4TMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773689097; x=1774293897; 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=UzfEOBRm8UYF5Bud6TQ+nwZEwcGRj3L2iCe9ZCoZ5BA=; b=SedsRVqT/+q9bEQy8KuLTEyUdTXz3DGSnl4MX7czucMMYZRzDolWX9Sy3xupL4EtDK COjLHE6AhSAimaEn5C8W9Dere9u0T1HqrnA9JsnFikskmTlgelNmG8b5M9vEMHyV1IS8 aLxkkqjhooxSBnHdScvJfglnWyEvL4wEHivArktlrJd3Pd93wZZ/rE5rKa+rSxrh7R/r ER8Tdxxgx+0YFbGwABWaW5V4LynKvrsDNOkcvG6rz/QOel7lSUf0sZ4A0CZtyNwp2o0o l10+x9XTyodorejLrKvgtXAeLPx1sJv4+tO4c4eCQNDXfpwlsKRIA8ukcfD41kbGnLsb jilQ== X-Forwarded-Encrypted: i=1; AJvYcCWr4AT7QW34BBAN5RA2K/Ynn0atgbIUG+R63kj29uoikRco1AIh1zvNwLM2jE7RNhZr8Mx3wnW3d1wQ/Nfa@lists.postgresql.org X-Gm-Message-State: AOJu0YwEvBkqQiX7W9WmbjmMsFOaHXChNPOI1A5Wak2FAATo/E8AwIJT GEOwkQvk4qjhEr2LGN/fViilMeljE8ZIto6ZZcx/+QEA6Sj8V2UsfqsH5AWPcPdu5F1G2WVGL0D J+XKqnbOOa+2ADRk1eoKtVcN1VYyO2Fc= X-Gm-Gg: ATEYQzyy8gu7k9BBRWuTfouK0a0q7btSntkn0KIOlUTh4GZzNr2oFbjL06USTb3sgfC +gqNCo/V2ywBpFykA2LBgqC1TbM74I5ankcFpPS2NZH7g42C6f+fLao5rbv9aBmTTIXpaKcieR4 6hn3nYFCpHGiVK78RPG49wJLOoNz09mvqS0nsxXyjCkNXVkcPSh3Jq6x8S9uFNMGD8YU0XBXpAG gCF+BGaMzLPBwirI8KSk28Jon74jbV2HHCQ6fwwExJPC+3wyifa9nK6IA4AcDTowUZn4yhzqpaj QiiXL+ROUzyd5D4t7nBYvuC1Knr8dwGYNqX0x7npJcrRYtzBGtuUyDdH2zGDd5p3iN2o5sd7+Cy qxsbSSAr/e+W0vio= X-Received: by 2002:a2e:a586:0:b0:38a:4197:7e5 with SMTP id 38308e7fff4ca-38a897404b8mr52075011fa.21.1773689096937; Mon, 16 Mar 2026 12:24:56 -0700 (PDT) MIME-Version: 1.0 References: <202603161503.oft3hnonplyi@alvherre.pgsql> In-Reply-To: <202603161503.oft3hnonplyi@alvherre.pgsql> From: Matthias van de Meent Date: Mon, 16 Mar 2026 20:24:45 +0100 X-Gm-Features: AaiRm51B_rd6ucSHerpPMLaor4mSjbRbCpMzzdXr_L489TxHm1lcZCrIA3uMYGM Message-ID: Subject: Re: Adding REPACK [concurrently] To: Alvaro Herrera Cc: Antonin Houska , 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 16:10, Alvaro Herrera wrote: > > On 2026-Mar-16, Matthias van de Meent wrote: > > > Note that most of my argument hinges on the impact on other, unrelated > > databases/tables/sessions. Replication slots have a hard cap defined > > at startup, and effective_wal_level increases the WAL generated by > > practically all backends. > > I'd rather have a new GUC to declare a bunch of additional slots that > are reserved exclusively for repack, set its default to something like > 3, and call it a day. If all repack slots are in use, you don't get to > run repack, period. > > A slot costs nothing if unused, and we really don't want to make the > interaction with regular replication more complicated than it is today. There are a few overheads even for unused slots: each slot uses some shared memory, and many (most) functions that operate on the shared slot state have O(n_slots) overhead through e.g. ReplicationSlotsComputeRequiredXmin(); so having a 10k slot limit whilst using only 1 will be slower for that one active slot than if the limit was just 10. Granted, that's not a lot of overhead, but it's not free. > > However, we don't live in that world, so I am opposed to allowing > > table owners without REPLICATION to take any/all replication slots. > > I think requiring REPACK users to have the REPLICATION priv is rather > user unfriendly. Some potential REPACK users might not have any other > use for replication at all. 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. Kind regards, Matthias van de Meent Databricks (https://www.databricks.com)