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 1x6MA6-000BUF-3B for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2026 05:56:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x6MA5-00HXvp-2l for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2026 05:56:57 +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 1x6MA5-00HXve-1s for pgsql-hackers@lists.postgresql.org; Tue, 15 Sep 2026 05:56:57 +0000 Received: from mail-pz2-x10.google.com ([2607:f8b0:4864:3b::10]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x6MA3-000000008eY-3NuI for pgsql-hackers@lists.postgresql.org; Tue, 15 Sep 2026 05:56:56 +0000 Received: by mail-pz2-x10.google.com with SMTP id d2e1a72fcca58-85469b2e1d5so3059037b3a.1 for ; Mon, 14 Sep 2026 22:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789451814; x=1790056614; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=eFxzhV2/XyWQUbZ1ugsZUVbEIK20kP21nlhjc90BGWM=; b=WOZ4B5hGrNxGbtV5IxEE3nrgRcvnGtcjJ/PNw3wfOR9pUGNH/28QqAgh5LHaP2aTVO 760gfvxVIJyGG9aaHQOQcsM2bXxv3nMxYl4sO7S4DRPhX2TDbbYH1VNGz2tH9OQaoQXx xzRfJOL14YCQrxwQA16cQspFyqQrZ3+8petNYu1ryBlY4ZgHXCJZqOPPCizyeLPADcYs ifd3mFoCE/FuekLiDbGrCn5kmER6wQ0SHIkf+N58WoXeCI9jJNA+cPCWg/bAx2vUkUgP aBNgVdeZoPN9VeIqMRSEbefXHVJA8gOXA33IuLjK4bXXm4rsm/tfuATZH0o6ga8zdKFx 4AnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789451814; x=1790056614; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eFxzhV2/XyWQUbZ1ugsZUVbEIK20kP21nlhjc90BGWM=; b=AzHNr40IOadhp4ywwbOXPf/DByIEMi6Pjvu+vUV54c2IYcCEgt1ei6V/G5sxRJ15kM 0pnSD3doKFIus6pc/RlUk2c5gdDNZQFkgbWCrMCrgJXv2f+6/18DIexRh6/WPywMw6KL UJT/br1gaYE3iixwZjHPexNzXdWQGNiGX8ZazIayrcf0/eIR/Kj2eyTZybf14kX2Z/jU j9WOFyWWDuOUonzaOwNKLgWVtiiR+LFR67rouAloGcZrhp/jVJ/FbUOo9lfaJpS2WDqc Q3zFm1tWNzn4hofAV+nO83HhaXY6ixS/4solBoUvCPoCmLxDWuNWv2a8Rw3UMgAXRcvm kEqA== X-Forwarded-Encrypted: i=1; AKwUvByGVzvyXzjgz+6VaJ3/VqMVhrt9DKZaCIMQnrhoacavCynmFmiHS0QuKhYfVZT5f3MrYw4x9E4WOFgrupfG@lists.postgresql.org X-Gm-Message-State: AFuF++kuSTrf1eXRWnYYgwkvYjt4VUuriTMHZjweCNKiSFQ1i/q4mrNu k7PrkcO7U+uqDUplwAiJCWqT31H21N8YMWrAOu4cT+NooHleowAicWvI X-Gm-Gg: AYBFou0cmuZcrytROkDVCouiJd8hxJsjpvUWc91jUDrWEK6aWNITKmXJGElUZO72ij8 eZHXKkT2cK+cyQyH/WCCRUvb9bSUbcv4vaLejM8Dx2sOR4xuVRO631qhhTl/1J36Kgwxu6r+z/M h7iLIxTxBk9ja6Paq2EZXLzAVuecBpiExNRQf9f6HXch23CgWdf3PBQyep8lToY31c4x0DJDHvk xRwGmxRw4qC0UMfL6ZRu85PzYAzZStweyrc72x0T99n1hH6KgqH4/owwBzzd/IqUH2/tRzv7zbE kBj4evDctSqvxXiC1Xdmfm9L8DOCChmQe7vcz3vHNj+GoNb0AEG+0XkriktkNdgTiEShBIcgG/L elCI4SghGFI2HcetCV3/N/l900A9wsyBh73CRJvTgC7y5UgWeBc4nQrVxUPzivbPPJt0gFL4vo3 yU47SNGxBNe3SpNGvLxiYrFWZ9dag/ORrWYm/Yq7D8kgfskuL/HuWPaLunoKk+I14nJzrtHQ7Ha fzreqZWsA== X-Received: by 2002:a05:6a00:1a10:b0:871:41fa:d1c6 with SMTP id d2e1a72fcca58-87141fada6bmr484178b3a.3.1789451814065; Mon, 14 Sep 2026 22:56:54 -0700 (PDT) Received: from smtpclient.apple ([185.135.79.161]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-86b5062c60bsm5579911b3a.22.2026.09.14.22.56.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2026 22:56:52 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.700.51.1.1\)) Subject: Re: pg_createsubscriber does not check output_plugin_libraries From: Chao Li In-Reply-To: Date: Tue, 15 Sep 2026 13:56:17 +0800 Cc: Jacob Champion , Fujii Masao , "pgsql-hackers@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <548B1C2F-8368-465D-8309-930A7EE58A90@gmail.com> References: To: "Hayato Kuroda (Fujitsu)" X-Mailer: Apple Mail (2.3864.700.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Sep 9, 2026, at 18:33, Hayato Kuroda (Fujitsu) = wrote: >=20 > Dear Fujii-san, Jacob, >=20 > Thanks for giving feedbacks. I'm confusing and let me confirm few = points. > The situation might be different before and after the PG19. >=20 > For PG17 and 18, FOR ALL TABLES publications for publisher databases, > it meant superuser is required for the connection. IIUC superuser can = bypass all > permission checks thus it might be OK not to check these points. > (We may have to check it though). > As for the PG19 and HEAD, we allowed to re-use existing publications = [1], it > effectively allowed to use non-superuser for connecting to the = publisher. > However it meant additional permission checks might be needed like = Jacob pointed > out. >=20 > In this thread I do not want to broaden for other points and focus on = the added > GUC, thought? In other threads we can improve --check option more. >=20 > Based on that, permission check is actually needed for PG19/HEAD same = check > Fujii-san pointed out. For PG18/17, we may not have to take care the = usage of > current_setting() but same code is used for better understanding. = Attached patch > set does accordingly. v5-0001 also has a test for the case just in = case, but not > sure it should be pushed. >=20 > [1]: = https://github.com/postgres/postgres/commit/85ddcc2f4cdef490276d151c80459e= 287bceb782 >=20 > Best regards, > Hayato Kuroda > FUJITSU LIMITED >=20 > = I have nit comment on 0001: ``` +/* + * Check per-database settings on the publisher + */ +static void +check_publisher_per_database(const struct LogicalRepInfo *dbinfo) ``` I find the header comment slightly misleading. Although = output_plugin_libraries is checked separately for each database = connection, its effective value may come from database, role, or = connection-level settings. So, maybe rephrase it as: Check effective = settings for each publisher database. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/