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 1w2ELR-0006dA-04 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 20:15:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2ELO-00ChOB-0T for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 20:15:18 +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 1w2ELN-00ChO2-2e for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 20:15:18 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2ELL-00000000U2q-3ajY for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 20:15:18 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-43b467dcf0bso61234f8f.0 for ; Mon, 16 Mar 2026 13:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1773692115; x=1774296915; darn=lists.postgresql.org; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hcPlDEvxjZJ0Ifxox/d4xlGxOlAaZmT+qJIZ3FRQwuw=; b=PkvoqWD2Bvoa2zjyRJL9w0MvqZboHCE+xTYNu6PV0yUXar+3tXxm2Z2mK2b2BhIn39 BunG28o1IB9VECWNgahVFeiNkjy3IyhJ2AgGZ5leHsWPVr3Srz99POnnX+IZvANp7+SE zByKdORqGI0Lg/tng6YdqcONKQKYhsbIUP/eOoaXYzOxSYMh0mb9KuVDgM7UUzKSuGbs QkAmIQpsNb2tmR1IrB6kJsmFHnaIWAuIvNSWSLRluZddU9/k51S3RF6q7ypzz9jgwxu7 wF6vRHwEIjqzxoR5fjX1ZC6xUdpXSNhanZXMfASZ+k9wjD1sX6/Ak04KS7LAilIiio3W bpIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773692115; x=1774296915; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hcPlDEvxjZJ0Ifxox/d4xlGxOlAaZmT+qJIZ3FRQwuw=; b=SCKYTnUyNIbHLTuKOMtTudKuSXLt5SqMnmmgnOMrb+recKHRff+ArUY/Zfm+uZ7BTb C0QmQi955Xa+MqPLy+99EEYo472sSJqcYgpsBo8f+4PbK/O4FZdEueBvV770vJ/0R+mU oC2FCTCeq72ApLAOZ9mqVCaycS1DOcVVcUmGjNCFQpFiUyKrFRshDbHnx8APkZRAfgBQ QBQ/rKTpK7sh9/qpCgrbNITaluFF1aIPGCfvh8PX46/OQ9E44V5mHjxZriR6y3cHiSjP UiJLqxsFd9o4HnBRQGMWu+X1oc5OMywrplbLLuIDZazUXQcjZzN7WQpaoVRoAaFbNjtv yGhw== X-Forwarded-Encrypted: i=1; AJvYcCVlgrXeqzishZJYjrY4rLVXSMA80Bj78r4rxPAcDrzmGFG5+V2QCEJDP5PXVxyAPuhxuiRauNGdZ0yYLgNr@lists.postgresql.org X-Gm-Message-State: AOJu0Yxadcm7/Dq1RT269mzF1ywae/cxIJ9X8RG6mKJIcymc1NFFpPKH C7SNE9zhY3CpYA9jS0xTJhcJgzIs7P0XCYeils6x2CQwDkhaj21jI7HyY+ZXT6rcuzY= X-Gm-Gg: ATEYQzxc3svA6Nzybj0u+be89eOdv85Q4sr+gevTsDmZRygDoMj4RXUB/bcxWP2rVvC OLfUmrk5NYk3rpss0mHVUzAPENullEY3ruQW0rT4Gr9gXLOaCy547KDrDyi8hofly54rpEbIh7x SmlhJwqZpmrg5hbqIAS1tjNkO8XsmZfp2tRDxuhLzDOhXegej+mi/ZLkBSi/9vpTsEFiMjufw8U iaHwguF6ksNiBbuCvl+gE/u1Io+pE+t8tiemwWOb1EBICUUZbIzD00/2ferJ+tRwCYh8o29Juql mocI4xMRhAutj/DWc5ygH0xSKuDBJ3a4FHTHMz8209YZRZeTtg3T+Bjnle9GFqVCNWGQO/216BA VxEwC4tO/tUN7U+OplpsVGLYfkOzxQoG6M8NSDjiQNlfymiLHtB5oZuztG+4VR59+BBRbkql+yZ MBNGl4jreC7aFxQv0WY9VanngqtgVIYoTG3IrW X-Received: by 2002:a05:6000:310c:b0:437:7719:ca82 with SMTP id ffacd0b85a97d-43b49817ffdmr1903591f8f.3.1773692114992; Mon, 16 Mar 2026 13:15:14 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b3e9a4fcdsm17483219f8f.8.2026.03.16.13.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2026 13:15:14 -0700 (PDT) From: Antonin Houska To: Matthias van de Meent cc: Alvaro Herrera , Mihail Nikalayeu , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: References: <202603161503.oft3hnonplyi@alvherre.pgsql> Comments: In-reply-to Matthias van de Meent message dated "Mon, 16 Mar 2026 20:24:45 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <107397.1773692114.1@localhost> Date: Mon, 16 Mar 2026 21:15:14 +0100 Message-ID: <107398.1773692114@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. If non-SUPERUSER user could install C-functions, it'd be easy to install code that leaks data. 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. 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. -- Antonin Houska Web: https://www.cybertec-postgresql.com