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 1vXy2N-00AVpw-1w for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2025 08:46:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vXy2M-000lPv-14 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2025 08:46:35 +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 1vXy2M-000lPn-05 for pgsql-hackers@lists.postgresql.org; Tue, 23 Dec 2025 08:46:34 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vXy2L-0029ei-09 for pgsql-hackers@lists.postgresql.org; Tue, 23 Dec 2025 08:46:33 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-bd1ce1b35e7so2970347a12.0 for ; Tue, 23 Dec 2025 00:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766479592; x=1767084392; 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=KaFgdF0PPHsFJe1NwrfKx+Yp8xty2AYTbipC3CDVnwg=; b=l0qCRtJHONC2s1eggiIQRBb1nnE27Hbjc22aIfw+c0p7mm+XcMcu0oxqqch4Tg06Pi rXO7qmb04qO26NVwJO47u5NMoIHagJzrXIFdsUHC5/lbZ6zEX2H7Uz8sPyQb3TTnwN+K Otc+yjn7fv+CiukiiAhi12wKpaQGfHc5JrbWFsBOpd2INojOIal7sGee7E9RvElZOCkL +d8Xc70OTtYzKo7xatAXf5O3g3hh6zz39sXjXNadWbJ/tkR90jl7WGqaQhcwwLPSY/jo 7XDCQ6+YAt9ol455i1UhRGxm+XLPf6r1GyI1EZzFal8x835td4NNV39nW8jYpDpCx3BA +TNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766479592; x=1767084392; 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=KaFgdF0PPHsFJe1NwrfKx+Yp8xty2AYTbipC3CDVnwg=; b=H1cP24VT19YTp/tuzdWRH3xEeLUMwrHa4Q5x0qNMKsaU7nOLmyOPyPUMJ1BTrk5MV0 qcGZUTfM30tDXJOUOehl5YTFD2LoT+egBsLoPbigd7ygzgce3n+d+g0zbih2wFjHM7nG VD91hv3ULaGednWSkRFcQ8jRp1YAJbycSo/9+Q1ZxETrsfnV5jYH7FTwedyA8/nR8ZJM TYw2ruUCQ8iYFI8yenov+cOHJupbjQqUj7p9e3E6UsQvWDubSLCJDKQ4PFMTI5qKi3HD iEMefPGyxQAdXr5EUvCu8md8I8xn79tBYPZbJikWbQUDZwwNUtKXoyAl73DDjAD6yu5Q zDzg== X-Forwarded-Encrypted: i=1; AJvYcCWF9IfZonoNabbkl2TwZDNJRvsk625tkZ5IOPHnhg06vHV7KjqJLfopmaOrn54dlxHBl2tDyXeCR1z8beSk@lists.postgresql.org X-Gm-Message-State: AOJu0YxZIyqK6saYpV7AShMl2pLVrq8Pj2NBh+vhjKMCEbbUB/E/mWtg FZ6pZdHGXrLNRx170LXe9n13b8HJN1Lit3l5b9gNQapJ1jgC9olX3x7x X-Gm-Gg: AY/fxX4k+RG3du/k2m9ZrMQvQLuE7ZTPUJpWn039DNUI2KaRJwN/MulJtjHolQ6G1Sn +iV1O7DL7jE9F9PlT0/ErnxAuoOpkI6LvfBAGhA7dba5NZtlN32IE3XgVcDKky+2p5x9c7ZM9cT rJVT4/Vry0F328q2bPDysIDjJruNkv0Xb7/0sMlidFoRLavteDHBR9mirKJSEGjR8YtE984TN+j koET8F58vt1zrrkjN42q8MuE26TR0RupQrGEBYlCLcUHGDbuez82M0tzHYedkrb2X6W8iVoZR9V YYOoaeJWZ8fkhwCz4oqyFFs6aC7e87+62G2T3HKnWfsH4P9z3QpEAlY6DLWlh25jSY2BA0vp0r5 XMHqCHdqSueTyIuasCKaFwzjj/SS0PefaWi3DAIPt2KDTSUZRynUzR6y1lhlb1pnHJTsl0OOj+X FulXHR/VQSGB5iAtN2aAYC X-Google-Smtp-Source: AGHT+IEsbtvopTsTwMdPMKmhVEQNezw7bqv/TN75o8xXIzEhgJUcDR7rjgcu6OqKzq7bEtEDL+jcQg== X-Received: by 2002:a05:701b:220b:b0:119:e56c:18be with SMTP id a92af1059eb24-121722fe420mr8099898c88.38.1766479591654; Tue, 23 Dec 2025 00:46:31 -0800 (PST) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1217254d369sm57947576c88.16.2025.12.23.00.46.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2025 00:46:31 -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 16:45:56 +0800 Cc: Fujii Masao , Amit Kapila , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <35BC6A31-9816-4DC7-AE90-8D4C073C20D6@gmail.com> References: <0C48758A-25F2-40BD-A75F-9E4C2B3C2996@gmail.com> To: Japin Li 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 23, 2025, at 16:13, Japin Li wrote: >=20 > On Tue, 23 Dec 2025 at 14:17, Chao Li wrote: >>> 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> >>=20 >> A few more comments on v6: >>=20 >> 1 - 0001 >> ``` >> + if (opt !=3D NULL) >> + pfree(opt); >> ``` >>=20 >> =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. >>=20 >=20 > I think we cannot omit it here. We have two pfree()s, one for frontend = and > one for backend. IIUC, the frontend pfree() is safe to handle NULL, = but the > backend pfree() is not. >=20 Ahh=E2=80=A6 You are right. I just traced a backend pfree(), and it ends = up calling GetMemoryChunkMethodID(const void *point), and the function = doesn=E2=80=99t handle NULL pointer. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/