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 1wWnuh-002rkJ-2j for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2026 04:18:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWnug-004rxl-21 for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jun 2026 04:18:06 +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 1wWnug-004rxd-0a for pgsql-hackers@lists.postgresql.org; Tue, 09 Jun 2026 04:18:06 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wWnue-00000001n6M-2OkL for pgsql-hackers@lists.postgresql.org; Tue, 09 Jun 2026 04:18:05 +0000 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-36b9b15af73so4641337a91.0 for ; Mon, 08 Jun 2026 21:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780978683; cv=none; d=google.com; s=arc-20240605; b=QuZy3Vp0CScq/wCTfI6Nbeu29tLGwS/nbMIA1gLYnQfZUtJ4a4lTcyZgw+HBr+cz7G fIH/ruw5icLCe6GBzKh/eCiGwu/hiYnl4DEVkMJNbSrLSps4T9kVd2Kas044PnklurX3 NZkZhvw/Hl7ADB/SxQx1naMaVox+hEZPQx6jH4fNbrioEbXeZ+ADhPbWNgzUmDajty51 03ND0+RReb7GKU1lkd8aCA8uZ5D15ri1WjeJSS+FDP5NgzArT4GNHdU0A6kqIP9dFhNK QuhZ4V+Etz03nANlEeFXKRJhPy709i/6qOGgi+cZKNARbsp+tCJGIvtc0/wS7RKFnkjD EIhA== 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=KQFeX+jo1b3Q2q9XCWGTsynW4XsYu7BAwW2Fks3x240=; fh=M6Bkwz78P/eYlmMEX0aPxX9sPbAg2iXCIugtMO2crTc=; b=gHqxcjbKh9GO4uMEwUFQVM37LeXHOdya9cKK9EPQWUePBB1FD+M1E7wCJZbzMy58TV RWygDYSFY9c+HpJwfOVIGp9MvgtVGU71ha5nbgnE/mkFIB6ImaCZyAhY3/xdkrbw9HCW XC3pESaPnVD/NrtTupTKK03cmUmFrjfqBFo/9dONG3j07JwJEibRlQp5zyKgvxzUYBsC 8T325VtUAJ3ayLtBWSXgOhbcJLJG/XXBJc9EZk75IHI47cgR8cCNaaKYt+1MXtRwr4q1 KCTqvnM5zOBRfPCBwjDcCj2b3ZXX+clSvSLjj2W9E3baTQ3uO9ybKFXyIf0z4CoYpVIG FPvw==; 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=1780978683; x=1781583483; darn=lists.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=KQFeX+jo1b3Q2q9XCWGTsynW4XsYu7BAwW2Fks3x240=; b=Zy5d6zsuDlyr3cXk1At9R/T0HkVk10/uQ5GulztxYumXXcqAPjNIv0JchdMsapPcnj zL75SlAV+baQtm1xBJN2n/Ek0/4ZYtzj0n9yGrMsmqu2yZ5jUgirLVkWIrGVEELXJpAT psOeLC+ypPhKQuBzBz+d/XsAoWIZylaD73135PN71azA++YB7CR60rhwDHc+gHqx1Ycv pfmBJy27GZrUUqbSyaO5P1IcQmLkps7/h6PblMwck7GMQfPz/pyJcwAvS7WQbr7tMc0x JFNOdWb/v3B0hLp0t+NSmgTBbJJXfBBU0mQxPCiLOcAyJ8YoHJ3hOdaDDb/RsVAYzwLX 3feQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780978683; x=1781583483; 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=KQFeX+jo1b3Q2q9XCWGTsynW4XsYu7BAwW2Fks3x240=; b=r7RPF4Sk2nraldPOwgCcwNa+Ia3fGXroOPQd+D25ztEh0STdGZ7yr4rcNFDmUGGeHq gdZsVlCgx8uC+XOlz+/q+heLq/9ARvIdFbty744V6hJPWKQJ6gDa1TRW6SYZdv9Z1mB7 PJq3h+AL5RdIO1svEJV/KyT/7pLK6j7D6WvQqSMS0IXXGa+mwgaPPE0Pxr7C8QMHeUe9 smbCtYuVtnEnPR6fxZR22qB/CMFkL233Dfy8DX6pPj+zWkYrL42+bGCJxot/WMuOa7ju yqTNIRR6cnwwgM2yQy/nNXNer9qtv7Mk8kFUcLsbbIK9xWMk2G7fMbLVTEmXLRdd46TO FasA== X-Forwarded-Encrypted: i=1; AFNElJ8hr4ItXGpHq6mIuhacU5g1JgvOJyxye95lzH6w9o44Rqv07Adc9BVEfmwmAUiLKI9zcF7138xXKnFv+D15@lists.postgresql.org X-Gm-Message-State: AOJu0Yw+0CNeqHJlRZrx+FK3gR9m5ZJz8mieXMiVdfpGyPEh71pT2k8Z q7KXaYfDQ83rC8Xg7m9AsFvXVB1ttd2k14ySI6NY+drALuG0LK54dViWF7/SmLPt5a172ut9VEh oqecrjRbYzciH/28ulKlQRG5mOQPm5Ul9NA== X-Gm-Gg: Acq92OH8cPKxFCOlTHc+piFO/xKE7XKwlE44txe9yVZTecY4wXCxLe5bkg9RU8j6DLm Zv5yDa9aKG2ZAIM9roTVn19Mjl3X+W3Tq7+OAIrSE+QEZDujD+rUmT+9pP1zp7rlK+kgmWx2nP7 6/qjcHV46c8cUPR7qc5AXpMRHM6MqVdF3mIogyfU3CJJHbO+yuN6xui2dO8fD8Yx+bkHWwdr3R7 4jCbT7zlXrIKhzIAPQI/nR398WZ0UICBNWynbTBK12UUHueDzfoWtmmrxCG5OlgVGiJb0+ENaGm ZSPEFSbEzuWHW1bZuGeXJutL8zRPEf7Q62NOiAlMbjqWb/bAcqBPXREyEOKrgQ== X-Received: by 2002:a17:90b:3d8c:b0:35f:b6a1:8d27 with SMTP id 98e67ed59e1d1-370f096ad7cmr20402133a91.18.1780978683632; Mon, 08 Jun 2026 21:18:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Tue, 9 Jun 2026 09:47:51 +0530 X-Gm-Features: AVVi8CcA50kRaywlnOjL3nFbKtPfsX2hz9Vs-3vpE3xH5mergQzclFBnmGbKhyE Message-ID: Subject: Re: [PATCH] Preserve replication origin OIDs in pg_upgrade To: Shlok Kyal Cc: Ajin Cherian , Zsolt Parragi , vignesh C , "Hayato Kuroda (Fujitsu)" , PostgreSQL Hackers , 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 Mon, Jun 8, 2026 at 10:36=E2=80=AFPM Shlok Kyal wrote: > > > Hi Ajin, > I have reviewed the patch and here are some comments: > > 1. I want to clarify, what is the expected behaviour when we upgrade > the postgres instance from version <=3D 16 to "HEAD + patch"? > - ReplicationOriginNameForLogicalRep(subid, InvalidOid, originname, > sizeof(originname)); > - replorigin_create(originname); > + if (!IsBinaryUpgrade) > + { > + ReplicationOriginNameForLogicalRep(subid, InvalidOid, > originname, sizeof(originname)); > + replorigin_create(originname); > + } > and > + /* Dump replication origins */ > + if (server_version >=3D 170000 && binary_upgrade && > archDumpFormat =3D=3D archNull) > + dumpReplicationOrigins(conn); > > When the postgres instance with subscription is updated from PG 16 (or > less) to HEAD, the replication origin is created as we do not have "if > (!IsBinaryUpgrade)" check in HEAD, > whereas when the similar instance is upgraded to "HEAD + patch", no > replication origin is present after the upgrade. > Is this difference in the behaviour between HEAD and "HEAD + patch" expec= ted? > Good catch Shlok. IMO, the behaviour should be same even if we upgrade to HEAD+patch, it should not result in the loss of origins. thanks Shveta