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 1wi6bb-000147-2K for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2026 08:29:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wi6bZ-00Gn6L-3B for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jul 2026 08:29: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 1wi6bZ-00Gn6C-28 for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2026 08:29:06 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wi6bX-00000000cZu-3FSb for pgsql-hackers@lists.postgresql.org; Fri, 10 Jul 2026 08:29:06 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-6a1160a2c42so483021eaf.0 for ; Fri, 10 Jul 2026 01:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783672103; cv=none; d=google.com; s=arc-20260327; b=auS09dGy3Tkzu05TfAZ2h+pJxA58ePpWXTjC1HTPOETqQPvbiKLgtGePFSIxpsACns 2mgTQyHDcQM/c/Pxokt83hG0CMpOOHnMSgXUoT9fJct6N3LlEGrQ/wI6MwV4On8jYHj6 VeSR6O/pr4ko03HdFAk8lrWji33hN2FodJb7a3iefNIYF6aIKqUK22fcUVimH+1fOsHW lcfR97fPUplzTQ+lV6lGg1W0XWb8njfYS/AWNKYz7DInfJmMPb4bGD6WqRWA9SczetnT OC34MyRaLcsE9Na2Wt5DwIFp6mDK/oBSZIBksz7ZV5H68rMX11u4j0CRzbZf2Ev1/hSN VSmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=E5ZVKPmYkvwO0O3dfY4bx4fVPXgrB5rxuuiJJgG0m0g=; fh=Aq0xJI+ENBM8X9wZ3R55devl8tmO6HZBHEhVucZn92E=; b=RQva6xbs68JSUi9Tw/VRyJVz4/gEUhb5gUaMHRwJ41nL+cSvkHLefTpWQwR4FrT6Q3 neS7evyyfaRVqMaO5cTop3HbYpDulpwlbAK6dauyKaWNLh04zS4J30pmXSn/kNSmcQqR /9cJQY+25kyKRtdrhT0BnbqleCPa7oVrQxRE5VoiHBFVubILs464aHZjOsSb8zsQ6IAd EFtJsDK4mT5yzI8YeXixl94hXRPKsPFWbcX/LvBCfjl7q42NkLvurHgfurSnbtAszyTx BqOZFhHr+FCr14xZf/hbDcyPLJzUsamJXEMzXYPKis2tZjWCYqSJn2mH7Jnno9qPBf0W O1ug==; 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=1783672103; x=1784276903; darn=lists.postgresql.org; h=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=E5ZVKPmYkvwO0O3dfY4bx4fVPXgrB5rxuuiJJgG0m0g=; b=pO6PTE1ANmQOnpZf0WI8/VRVcoM3rL9evzjJVALkIgr5oKkugHWNRCTpBXQPU5fw33 vOO6vhD9GBdQVlm1+SiWQJEF8y3M1kNevIUHR0r3AUIzA/X6V2a+tnGGbZV/ZaH+nV1v n60lu9jkIsU3ndOl4C1T+IdijayWEB7mZfOc8FGPL9Z84ykxX2WxYNTgu0wywp2kRgD/ mgRH2m/YhQVMh+s+rJvf2u2FGLHOdyKtvyIqarV2VCnbv8lm2Gt8g6tAs6qGEicN9ru0 OOBtZaobyOxeAJ7NEOKpjGC9vkzDazN1UqNVdONFkuf65R0N9cpaKeWMJDQrPFGYIPFP ZOlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783672103; x=1784276903; h=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=E5ZVKPmYkvwO0O3dfY4bx4fVPXgrB5rxuuiJJgG0m0g=; b=QU9SWVUwci0HJCCcxcusi27+38sajretnTOlKNdYvEUyhBpWeKG20i+5F7muY2HaUJ kOrGB5q+F7aJinc3KRgf5aqJzUoe4OH3wzWAzB3whtKE6UojKXOU/ru7s2FhpNHC1VCZ 92Uk0PSJmXzEBJwJvjOd72rl0QRKr0k42UGtn5BLP9JiwhGIgU0eDefihna2LUYcFmpP O89YNxnbEAXZO6B0PYFJ3A2Q/ehUEI9LNI9oN2WuNzLwwgxJ6hJ8S7MoMJn/kI16qkuN 9H17DHsDR7/yj2uGK2YiPFumO4K2gM77zj7JCBAdGmU3/pme7uF8uXXZ6mCyxYHdHgcr dROw== X-Forwarded-Encrypted: i=1; AFNElJ9ZQptrmdJ+ELOIs1lNl2tgnaNTjwwKJNerFkIvgolrKTzCSX5ERVC4F4oI3U1KW0/wVHK0f3B2on4JFxL6@lists.postgresql.org X-Gm-Message-State: AOJu0Ywjq6aH+F9P19WxKA4+mnEH5ZcK1X0DRLbArLpOt5o9LkbKE0hl cPHGBvzb+nZSWs+wRH6AQ43J3GY1V/7dbv89zl2U10j8obS4FH7ADCpf4LdQWabHX93bPHNBQWd PGtK3xTWy51xEwsSIBUBCzHFsHBN193o= X-Gm-Gg: AfdE7cnr+Wdj88XPWZkG7zTQ/4A01ryOPDiBvkPJ5E6DV2OTkBgxuQQ5IfZiGBsH3QM eIEgm9UsLfN8EK9WO1acoPjSZgZpLFqqNMeovKE4OIto0IN+rst7JbDxv4Ako+beuARA3ywLsAr B7rowU26XAsIZl0VFRnJ5IcCNJONXmntWwbO6s0EH+ASvjv5MSV7nrPh5dk3eSnWkblNctKIoJO ZquszDpbDfcdtJKu+Wr/ll1EuYJ+PJuyl7CcnzUmbANcBJfVplObLFCMd3xDRTcSPUks4X+mSQ= X-Received: by 2002:a05:6820:83c9:10b0:6a3:76e6:d27c with SMTP id 006d021491bc7-6a376e6d94fmr4482508eaf.56.1783672102720; Fri, 10 Jul 2026 01:28:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Shlok Kyal Date: Fri, 10 Jul 2026 13:58:10 +0530 X-Gm-Features: AVVi8Ce2JVPnhgZKxqBB-MKuNLkO_1xe-LYe3ssjHgg6u_muWqyPqZHwBxSETeM Message-ID: Subject: Re: [PATCH] Preserve replication origin OIDs in pg_upgrade To: Ajin Cherian Cc: shveta malik , Amit Kapila , "Hayato Kuroda (Fujitsu)" , Zsolt Parragi , "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 9 Jul 2026 at 17:07, Ajin Cherian wrote: > > Attaching v11 with all comments addressed. > Thanks Ajin. I reviewed the patch. Here are some comment for it: 1. pg_dumpall.c dumpRoleGUCPrivs(conn); + } + /* Dump replication origins */ + if (!tablespaces_only && !roles_only && binary_upgrade) + dumpReplicationOrigins(conn); The blank line below 'dumpRoleGUCPrivs(conn);' is not required 2. Maybe we can initialize the variables during declaration itself: + ReplOriginId roident; + const char *roname; + + roident = atooid(PQgetvalue(res, i, i_roident)); + roname = PQgetvalue(res, i, i_roname); 3. We should add a comment on top of this function. Just like other dumpXXX functions +static void +dumpReplicationOrigins(PGconn *conn) 4. In check.c: + /* + * Compare against the number of active origins in the old cluster not the + * total number of origins in pg_replication_origin. An origin can exist I think we can reword it like: Compare against the number of active replication origins in the old cluster, rather than the total number of origins in pg_replication_origin. 5. In pg_upgrade_support.c: +#include "utils/syscache.h" We can remove this include. Thanks, Shlok Kyal