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 1wIf1x-008LBL-0Z for pgsql-hackers@arkaria.postgresql.org; Fri, 01 May 2026 03:59:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wIf1u-009rJc-1p for pgsql-hackers@arkaria.postgresql.org; Fri, 01 May 2026 03:59:06 +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 1wIf1u-009rJU-0u for pgsql-hackers@lists.postgresql.org; Fri, 01 May 2026 03:59:06 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wIf1s-00000004BkJ-0S7O for pgsql-hackers@postgresql.org; Fri, 01 May 2026 03:59:05 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5a1307438ddso1677492e87.1 for ; Thu, 30 Apr 2026 20:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777607943; cv=none; d=google.com; s=arc-20240605; b=lwd6x722+Z4qYLeZYHEgGXNAoho7xwotse3naQOovV3FkkMfqEi+8Ao39ha/IQd5yR SrqoDq5NM4CCpKeWpBu6UVeUFk4wBeogR+m4I4Pbul5eZ3PEA3+CAgLMKgbevOaGZxxw ujXBEl7nMeJC/SdFcaFARcyzW3/8XmMcaB757gYJRRAQOZ8iMAca0uTlWy2PV/TEEIXT tpodN7RLHnmowRl8xQA+EmEgwZQgBNlz6YyhPQff/7lZImd4pk6TCjYDKqtDd6q1eu1I r3DFvjgj5hOwFMOywtY72r/U66Ire6hYhLa4jd7i2FMoPpwINwhgYRsASVoON9tJNjTN 3FIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SnnYhlRktyZZkMIC5TmAZBfY3HQgZCBYaELrzRm6maA=; fh=tppwkZDvKrKJDLuNZyX2kA+g7IeMDuD/wutgKf2uWlc=; b=QpDDg5Uwjs9M9OARxVWoRYO0jIDWTdk3nTze9+b+9paBiRL40J59GtkQkKA6zmtCmB 5INr/dTXIx1lUrgsk8PzrvxVTpf+S9eDFOi+DkhDUW9UPkHqA7D0Ibh/ffCdeZtbkaTi ewDt9qDhzYuXUzOr8HGwfK0IsbCpsJ+1r4Z40lo1VbrwK2J842i718jXoY/xj12VYAJy N/1upBH2Sfu+d3fFx2Ai9GtueD6+PNUTmKwzxImgk3AJmD49NCgmKCdeCaoEGEGGuFIh zeiKh1pjUqrXFJ7/wNdHzaGq/C7ZcCZrNtBSr/DiDlbSqbb0AZYN4pFs1FOYsRhWfo3C iX+g==; darn=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=20251104; t=1777607943; x=1778212743; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SnnYhlRktyZZkMIC5TmAZBfY3HQgZCBYaELrzRm6maA=; b=oQF2oIQYDXnCU/JxgkhOVKE6FgXnrZPE4/OyaLYC7/O/AtmMw20baNQEefYTPXoRw1 bSUjbtf1RStUb17ik1s1VeIETP6u0w3RgCLa+Xq2Y8ZDuCnej7cDyprXsHZfnenLIA6d RjjEl/hNxPGibuW625a/cgGFUkoDwvirbcI+eSnFcmWkiOcH5cHE4L/DKRIc5Wu63HLy jiM8SttxZEQxrOiZB+fEIDVQqtBdcrom+4apM2ooQBkgES+6yOoOmdhsJhhl7MDARIKJ r7ceQkXOthxOahTJwTuaILP+IlEXA1buVe+z4gTfaIAzEJVpW5VzupTe54Jyb9ViJPJe IxLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777607943; x=1778212743; h=content-transfer-encoding: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=SnnYhlRktyZZkMIC5TmAZBfY3HQgZCBYaELrzRm6maA=; b=XCWZ84gobzJ2D/mM9+0fe8lxp+JcIjTpk2eC9fJE08qbUiuDgvx/FD7wQkBOy662vZ WcIUXxjzNKUAkTOKZWwjl8bKKdSakkCm1ycI97MckItDEGZFc9EqVB2B2W/RX51N64an wKMYyyQ1CKYCsF7UMeRxshrtb0d0ccKNX+KO2SQElfrvUX2ahHOGxauzRjoL2tTvjL/7 Q/HhYa6cuF4RHyaX1HEmtk7LEd2jLAJ/bGC8ODSzYXnf/NLvcwrzaqSrbkz+VY5HdI+O nztwDIzYZ5u7Kwr/VoenH/hX90Jh5sEwV8wOrUAgCGiXRDOP6xruCpse5jkOgRbglzmk jamA== X-Gm-Message-State: AOJu0Yy7h+XbxrevjI9Y/3zsSPmCUWEVCZ1QRHKb9Kh8sMeYs57llboB ZFohPHpcHxoFKd0AWmEhSOQz1nlZNpFmGqb0NUV+/sxtCkojmKvE4rJS6MSR2sr7+wiWWsP+M7X PuEiF7mCigj1SL2UNd48dferYwSGnTgY= X-Gm-Gg: AeBDietFhL/pfQT2dapVAOSgDgLGWL30+h6IJoCDR4E0I3EMrdUygumYyxe8KqMjKjq HjD5wPXAKbbNT12CWuGEAirs69iYis+tW4pPmtjufndojaGusN7SWpL5ZwiVNGK42EYC6Fk+ocF 6eOMRbPgKUexkb0ptAIO0qTQbGtuunyiqvdB9/mj2Vgel7ipiYYJc3bBhRS5scBrYJtAGZuJe1P k6VvxNvzFtW4jmps+xTifP6WYn0KhavhZz27OGHrNYYWo4nTsXNMVYgo8khMmiIcsE8rOtX5KuB ac81e/0DMxnAhEnWGw== X-Received: by 2002:a05:6512:3d94:b0:5a4:1904:711c with SMTP id 2adb3069b0e04-5a8522e3765mr2146079e87.29.1777607943193; Thu, 30 Apr 2026 20:59:03 -0700 (PDT) MIME-Version: 1.0 References: <960DD2C4-A22C-463A-90ED-86E0FABD8D20@gmail.com> In-Reply-To: <960DD2C4-A22C-463A-90ED-86E0FABD8D20@gmail.com> From: Ajin Cherian Date: Fri, 1 May 2026 13:58:51 +1000 X-Gm-Features: AVHnY4K8NouDVchSt-NEIkxg8B9S5e7aA0FlgEo2sXyE7JY35SwS5W34CD7bstQ Message-ID: Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server To: Chao Li Cc: PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 30, 2026 at 2:12=E2=80=AFPM Chao Li wr= ote: > > > > > > > 2. I think you should add a comment in the function header above > > GetSubscription() stating that if aclcheck is false, then the conninfo > > will be set to null and users need to call GetSubscriptionConnInfo to > > get the conninfo. > > Updated the header comment. /* * Fetch the subscription from the syscache. + * + * If missing_ok is false, throw an error if the subscription is not found= . + * If true, return NULL in that case. + * + * If aclcheck is true, check whether the subscription owner has permissio= n on + * the subscription's foreign server, and load the connection string from = the + * foreign server. Later, GetSubscriptionConnInfo() should be called to ge= t + * the connection string. */ Subscription * GetSubscription(Oid subid, bool missing_ok, bool aclcheck) I don't think this comment is right. If aclcheck is true, users need not call GetSubscriptionConnInfo() to get the connection string, as it is populated in this function itself. It is only if aclecheck is false, do callers need to do that. Isn't that the case? There are multiple places in the apply worker where GetSubscription() is called with aclcheck is true and GetSubscriptionConnInfo() is not called there. regards, Ajin Cherian Fujitsu Australia