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 1vXvip-009TIG-1y for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2025 06:18:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vXvio-0001YJ-0g for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2025 06:18:14 +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 1vXvin-0001Y9-2z for pgsql-hackers@lists.postgresql.org; Tue, 23 Dec 2025 06:18:14 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vXvim-002FVS-0w for pgsql-hackers@lists.postgresql.org; Tue, 23 Dec 2025 06:18:14 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2a07fac8aa1so50923295ad.1 for ; Mon, 22 Dec 2025 22:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766470690; x=1767075490; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=t6eHNKIQXMniYNeysHEKEMWo7dJK40TyQKH4ihQT3bQ=; b=kA8WT73HE6hd8/iypt0TNSXcW3TQfNCDoDQMO6WuBCy4KrInECLeUn2hv4k6MPFx1K bO7DfdN6cqqNyetP6Sp5mhy38t5MysWcy2JNM7YD/L19+vf6laQPNLkHY8m1jlB2TcjK KDjx7e5Vs2koLPTlcKUr8I/jBmpYstbBHAQLn8oyD2N43b+tA8mHqcaJeRRzNMnuJ48D ybKdRcZC1NloMLeAgv7HNQhDRMGc1mCaHkrwKrSEX3Uufsae5fu4z7YsqurVWG0ZSRsT fHmaQj6e2me5wYWONPvK6buo9HCfoyCRKtf2HKxuZ0wwDA9vnvess1CtlTWHn0bUUo2W 4cIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766470690; x=1767075490; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=t6eHNKIQXMniYNeysHEKEMWo7dJK40TyQKH4ihQT3bQ=; b=n/hHI9Mf2cczc7AD6g32yl3SbOg9EglVJvPwkp0QofLYsmFuA2XkgDA+BXl6BC9uuH AyTxkUc65yLCLrVLo6PrcQrT2zH5tY4mYZil+R8HNQKfTocP4APYJ8fBYb4FsIDhDsfI OR+y3URoPXEsr98QaqDwb53TTswbaHDfW2sMQSwczrKv7lBLgIG0qh74ygUAmW1PWAoq ofyRSgYepIB8uqzQPg8frEj4R/ikhMFPZDCzAwI/ll8SDMmmerBUSi8vtfOgdFC93wTW SXAhM1SBDRwEkHLqJUIEcmzyMQm9F5TvsoOOFVTJuQ61zz6xoA99cND5BWF7+YmhLU6l MNZQ== X-Forwarded-Encrypted: i=1; AJvYcCUfkRtPAOiGAPeAQmWo54qWPogI+Et3nac2/ap3iv6saoDEouEVy6VUn0SXzXuR0WUDehlfA/tRBYsDhik5@lists.postgresql.org X-Gm-Message-State: AOJu0YwN+RfFjg9v5rkjO4ImEvLtUoUVCtOEJMIaZdYcG9xtIjq97XIj j25xFAClK5QoFTV190Ea1GVICWNEUjOqPSbPPM/k4R6zSz3Qv1zt35sW X-Gm-Gg: AY/fxX61aafoKLpE4xUGG0IDYkkBvhDNb+VFJeGBWyHEbdXfWUMASxhlI4q5YNPtyXa SZfs5YI0KlPiqvftVtWRok7bX2Yr8UKcnRxDrnsh0xOqoR/g4iPzxjkE17zyrnoJeXy6g2ZlbMc BzFQz3NeME0TPyJaagJf08mA4TkWYRMQlFYAHBJckVla4sT5HGhhUvKSnAx2hMDNcctWBlZ4yWw pZZKdZhKnfCvM1uvt0eophvJNBWpKdQQVC83FbzZkEZVe7ccf8qjrMqVZDWqhAGkw6wy/iv+OGT JoJ14vAlAl/mE2LuVfCWOVn3mWFA2FmdFUpYZ1jVjkR5x7dWvPSXsLfpGxrJLJPGAKsGFv7qC6Q kooam1Iy/GkjR3fO/2D9soCnHUcPvnGbRosmFI0ahw4/28UOH62ZTG5KU8EjOXpyyh48H90hYrw 7ErH3sdsyO0JFP60GJqhNY X-Google-Smtp-Source: AGHT+IEz6CBQ9rHiviDPtjX4b1EvkIRRLhSHJVNSQLI050UH6QHwicwM4rTrxxwOgRV0bkI40eYSng== X-Received: by 2002:a05:7022:e04:b0:11b:9386:a386 with SMTP id a92af1059eb24-121722e9addmr18093419c88.41.1766470690368; Mon, 22 Dec 2025 22:18:10 -0800 (PST) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1217254ce49sm52915414c88.15.2025.12.22.22.18.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2025 22:18:09 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect From: Chao Li In-Reply-To: Date: Tue, 23 Dec 2025 14:17:34 +0800 Cc: Japin Li , Amit Kapila , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <0C48758A-25F2-40BD-A75F-9E4C2B3C2996@gmail.com> References: To: Fujii Masao X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Dec 19, 2025, at 19:05, Fujii Masao wrote: >=20 > On Fri, Dec 19, 2025 at 7:07=E2=80=AFPM Japin Li = wrote: >> Thanks for the patch =E2=80=94 that was my oversight. >>=20 >> LGTM with one small suggestion: >=20 > Thanks for the review! >=20 >> The comment says: "If the option is not found in connInfo, return = NULL value." >>=20 >> Since the parameter is named `keyword`, I'd suggest: "If the keyword = is not found in connInfo, return NULL." >>=20 >> This keeps terminology consistent with the function signature. >=20 > I think "the option with the given keyword" is more precise than just > "the keyword". > That said, simply using "the option" also seems sufficient in this = context... >=20 >=20 > Regarding 0002 patch, I found that it caused a CI failure, so I=E2=80=99= ve updated > the patch to fix that. The revised patch is attached. >=20 > Regards, >=20 > --=20 > Fujii Masao > = <= v6-0002-Add-TAP-test-for-GUC-settings-passed-via-CONNECTI.patch> A few more comments on v6: 1 - 0001 ``` + if (opt !=3D NULL) + pfree(opt); ``` =46rom what I learned from previous reviews, pfree() is safe to handle = NULL, we can omit the NULL check, which makes the code simpler. This = comment applies to multiple places. 2. I still think we should verify options extracted from conninfo. In = the 0002=E2=80=99s tap script, if I make the following change: ``` $node_subscriber->safe_psql('postgres', - "ALTER SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr = options=3D''-c log_statement_stats=3Don'''" + "ALTER SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr = options=3D''-c log_statement_stats=3Don-c wal_sender_timeout=3D1000'=E2=80= =99'" ``` Notice, there is no space between the second =E2=80=9C-c=E2=80=9D and = =E2=80=9Con=E2=80=9D, meaning that a user passes an invalid options. = Then the test will get stuck forever, which would never happen before = this patch. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/