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 1whLlE-000AZV-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2026 06:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whLlC-00509R-1w for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2026 06:27:55 +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 1whLlC-00509G-11 for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2026 06:27:55 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1whLlA-00000000Baz-1L5J for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2026 06:27:54 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-ca766c1c9ccso93006a12.0 for ; Tue, 07 Jul 2026 23:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783492070; cv=none; d=google.com; s=arc-20260327; b=sNwleZzwo5vHZQmGDpadB4KRUSCER9y+QM2xWCwlAsPNVUkKYCWEFFxNeXU3l0Or5N Fa7efXIfE2NmwYrPgmoiZ+Hz+RWXykGGqxLNir4hZyeUYCJ31GFPez5nHiKoXSkdoc3E r5+MBG525oC7g0LvwZOPZOYJ/UtXBCdoTjFaWBcFxPYOX31jpnGO1CINYkhuKru5T9mD DLUNHfCioSxLhj7hqCLRRCd5urr1NJeyXbojr9qCqZL3uNdB+HQaYXfgf62656RwGrbM aqI3x4pQ+5nqyKI22utGRBn3ZMaVB1P6T71EyhbEcommXckmdUTKRD/CAHa5cdzpegQf KLUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PwibIwnL/39p3VwtyxEEEHuBDigB8ddKnOdeLiufi20=; fh=HrvVKlVOCNzgwsEcns9m/HvO3LjFkSxoV4CKoc/NPoY=; b=RJds/u9pn2aQdI7Gax1dN4ytrzdvwfn+4F7WeOdth2w687D0p2QQvXSq1nXeXMlEX+ nI5/2Z+WaOfs2bO2bAiwpu4odZR5by54jSxthIhN2l7VgPkmJwOCZE1nIu0hlCvDBEgD wZ8PsdpaWtvizWFw+Gea+weqzhO01+z2FOke5s7JG4Lbb0+9JrOlrHpR1TzY6KNCOgOT FWY97PPAA8MMmyJSBFTmOaSLSJFUSPxpM3gjYZ49ATm30sX9pRhiRDzaqeeCD2L43rBj TOO0Dy9WyISzsRzl0OIXmHf67GTNxxSDVhbXQZ0eA1x4ja8nnE8Ceks/iyOQ3g7Q6I3v RWoA==; darn=lists.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=1783492070; x=1784096870; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=PwibIwnL/39p3VwtyxEEEHuBDigB8ddKnOdeLiufi20=; b=I3pUouekJ3oD/XImIA3hOQ0ZZzbRJg0h4lVPAjISRGNyuMMsFfDHMH96uqlveyDI5G 6/ozFBO0AE3Ys/PVGbJlaUSBSoMkj5LmcHIu9u0yJ36Iyhk9+xGG7t256rzKFOAUgFxR KIFiH1NAwQ+UzNXqYzStzg8VZE7/yekRE6wHmH1yviGcn5gZatSFxSocajTjFQbBRgkQ AIFdI5mMd1BQIn9EZS7DO6oUxSJSTkrx7QoNFxj0kml4PXwcmwYAgoVYnjFIsLWaDcH4 Ufgkzgg7U6z3LsO1moawWDDjcKPvL21Puh/4wOvDGtcC9Ns5OwrhSYldJ3pk57AnBdEc Iggg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783492070; x=1784096870; h=content-transfer-encoding:content-type: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 :content-type; bh=PwibIwnL/39p3VwtyxEEEHuBDigB8ddKnOdeLiufi20=; b=QhSdRKId6EsYXtQsPjIJjRtAVD/bMTrzbKkku9wI0Nu84SgjUGMs3l/CdFY3NIKZ/8 RY4yan05+0zM2N0u90+53XLS+nurjBkrUSH4Nw6uLxioEqvyv0OSZmLPmsHQiW4qykwm 9VY2PpGntaxEct93C/zvxM0tZdbaqUuvW1xo82qHGzyRZqTNjsEYm46E4nu1mWo+NlQ+ 7inNxeheFerFKg0lMYwFxobISQx6XG886RK4LWIYMs8TIl/hyZUudOgRrnMEbA5P2c7q H/bAnBPhPLRt5cNz4xwUYm8uw5uakalRMRQ/1VtV1oXfstoGWeI4TLa0UEsJ5SzmvCuQ YnLQ== X-Forwarded-Encrypted: i=1; AHgh+RrsotYI++NFSO2dxIXdsF9XUhuhKT5BprX++4LNZFhETtKzzS36gvTpVteX0rN0fQ6tyCfWvDmqvLnPxsOS@lists.postgresql.org X-Gm-Message-State: AOJu0YyUfSxYFfIyWmgmUX3ce68pL5xSAtrM5PSBIfVHr/wM+Mo4jKM7 akCBeblOJKBQ0m+xfjg7Djouec6l2s0BrEMPaoQ5d2ipZlVUVElsV21H0w952NK84EOMElrlEyf 79HZVzEzmmUvariqmGj/vElOySAVZ56U= X-Gm-Gg: AfdE7cmqWLpM8erIjtW/C3o5j+ZimdY5sTBFCP8mB32++6tgg8B+6dXR2ycJrRQZbch zw5MvtR2fYFs5HVBt9YqzX2pwg8Fizgxo7WRpfp+9/UZstFAb2G785BmQPsTow3nkBaJQRK5ldw fAhzg0Txht06xPkX7S0bDA4bELPPl+Mr7f9f5xlaouMnNCHMjslGm5OpW6KNMIoJ9WNP4Q45RMM 16YVFWhQFL+stjhqf5MmGf7C6ynjsmt0QMq0dKkqy3YyI1zeCtJ6julIY2x70XoEVAt7sRcvnBP ARP5P0YtS/K2gGpo9UanZ+ABGahIRd1zilCKIxHkCw== X-Received: by 2002:a05:6a20:6a24:b0:3bb:2883:a723 with SMTP id adf61e73a8af0-3c0bd0f9e23mr1335836637.35.1783492069488; Tue, 07 Jul 2026 23:27:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Wed, 8 Jul 2026 11:57:37 +0530 X-Gm-Features: AVVi8Cf007Es8cQ0u11jVJC4wzt2kenF3dCOzXg4qgwx-Rb_VTzZBsE052iY92g Message-ID: Subject: Re: [PATCH] Preserve replication origin OIDs in pg_upgrade To: "Hayato Kuroda (Fujitsu)" Cc: Shlok Kyal , Ajin Cherian , Zsolt Parragi , "pgsql-hackers@lists.postgresql.org" , shveta malik 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 Wed, Jul 8, 2026 at 11:51=E2=80=AFAM Hayato Kuroda (Fujitsu) wrote: > > Dear Shveta, > > > For this reason, my inclination is to revert to the previous > > implementation, where we compare old_cluster.nsubs with > > max_active_replication_origins. But I'd like to hear what others think > > before we make this change. > > But if origin created by users (or any extensions) have already been trac= king the > Remote_lsn, they should be taken into account. If there are three enabled > subscriptions, two active user-created origins but the max_active_origin = is set > to three on the new node, the upgrading should fail. > > I prefer to preserve the current behavior of the patch, which compares > max_active_origin and total number of origins. It might cause the false-p= ositive, > but even now it can happen. E.g., if there was a subscription which has n= ever > been enabled. > Okay, I missed this point earlier. I agree, let's retain the current behaviour itself. thanks Shveta