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 1vfsC2-005f1h-10 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 04:09:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfsC0-007u4l-1i for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 04:09:12 +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 1vfsC0-007u4b-0m for pgsql-hackers@lists.postgresql.org; Wed, 14 Jan 2026 04:09:12 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vfsBy-000Lnd-0a for pgsql-hackers@lists.postgresql.org; Wed, 14 Jan 2026 04:09:11 +0000 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-34abc7da414so4769931a91.0 for ; Tue, 13 Jan 2026 20:09:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768363748; x=1768968548; 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=vmPi9T23bTgeGK0TteCasWzOM+e3z91isIMMmM1gSc4=; b=QT2QRH19WclYxT10Sbw1X+2xZdVLFjwlDYnMHMNO/L8ZIBN2Q7FEQ/5oWt1+IEZ4EG 4qqKkwO4utz+I5z9a/SW0oUTl7PhscVeB3TwJuIqqeSXnZ4o76SS43uhNASPSAz4O4CY Q/C65zVO3PAJ6CNEvpBJDKSrY+CSUG1rHLPWj1Jzob2Gs6uPoC5hjXHruysrWSH9qUJg H54nRPS2k+4VUAv7KPdAEdfNBnOfI62yxv0syO1teZiMgbSaDhebretbtAolGTNwoalZ l+RsEQh4KnCc+XZx5s0FeC/ARjUdFd1fqU8A+DyJ8lhce3owe/qKAkELmA3ieFdCYwni MdGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768363748; x=1768968548; 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=vmPi9T23bTgeGK0TteCasWzOM+e3z91isIMMmM1gSc4=; b=OxflyLAn3CewiDgGss3ldtFc4Jfy6ImYgrSyqNgoHQp7zUJ/Bu4X2BrEo/BXTXjRqx kz3M+ZL5DKFz+kwuZ4mSIGhdVPZlEqg6vrtbcjcoc5BroP43Dx9fJCo7Ily7GUAGW3hb 2ZQ2Lx+0rzsAb0al/QZLi5v0N0hydtmgwsLbglBxuI8EqFJSOqozzVsqvUVnDfWn24D9 B94IWRx05HjO/wCDB+uU3sKLlWdfhfZCD1E2g7YWthLUvAU2moHue0Z923lBdwdiHnmx R7CpVLmTGIbfi4v6IFmFXzECUTAFKXDkRtQGz5oDFkyz11xkJiE3plgIuUb6ilaHRIda Gvsw== X-Forwarded-Encrypted: i=1; AJvYcCV+Zi4SUrH4sq1b0fN7UhmCxTaHNxVnvqaSY894IfiB22HMZsdn0WvmNkc/S2QrKhjBzNG+7qe+Qswfe6Bv@lists.postgresql.org X-Gm-Message-State: AOJu0YyFrDYC5A1wktMdusT4NmBIbhSRIlquH5II/4xXMPbp8eah7B4v w0vHp7teZ2WzdQsp08p+D3It51t9Y4FFIifOZ3LD1fwP9KL9XE/K55ySlaOWr1HvfYcs074jwgp D3r5Nftq4nZH3qtvIfaVhb0yciXCyo80= X-Gm-Gg: AY/fxX60BZPuc+letiYugx/QOjnL6ZzinSnipRMSnvyM/pCUBbx0NdeSCBvPRERdi9C qTHFMD5VKOT3WdYbZzGD9JEDek+YtXw/gRLYF7CYx/lNaIxIBhKJs08OS3PLK11/sCXldGpeLfq OzEmNYTIc6GOrdeD2r9FfZwfWHRdpi5JuYzVkJaexjYGoav0h1X8Pjtux9K/x+xRG39MVU3ZHME CS8ZZ58mEbrqEvhrMWjW8Yc07+gLlO5/chECqENKr+gAbdttMCHXMB6RON+7+Yxm72QyzsWyFBE WIL5x+kcbmY8AXxx1jM6i+OmFDSO1Mb4+ocmBJf35Q== X-Received: by 2002:a17:90b:51c1:b0:34c:aba2:dd95 with SMTP id 98e67ed59e1d1-35109134b00mr1530532a91.26.1768363747691; Tue, 13 Jan 2026 20:09:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Wed, 14 Jan 2026 09:38:55 +0530 X-Gm-Features: AZwV_QgTbY19gm8cNVD4kJPpp6JPuMsj_BjIJTjIR1fG-ANt5VQ2qHspXyQlqU4 Message-ID: Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup To: "Hayato Kuroda (Fujitsu)" Cc: Amit Kapila , "pgsql-hackers@lists.postgresql.org" , "Zhijie Hou (Fujitsu)" , Doruk Yilmaz , 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, Jan 14, 2026 at 9:13=E2=80=AFAM Hayato Kuroda (Fujitsu) wrote: > > Dear Shveta, > > > 1) > > +step s1_reset: SELECT pg_replication_origin_session_reset(); > > > > After the above step, please add a step to attempt dropping the > > replication origin. The original issue was that once s1 releases the > > origin, it becomes eligible for dropping, so the test should > > explicitly verify this behavior. > > I think it is bit difficult because pg_replication_origin_drop() has PID = in the > ERROR message. Also, this patch prevents first process resets the origin,= i.e., > the exact same situation won't happen anymore. Not fixed. > Okay. > > 2) > > Also before the above step, please add a step where s0 tries to reset > > the origin while s1 is still acquiring it. It is needed to cover the > > path where s0 should fail to release origin. > > The step has already existed, see below. > Okay, sorry I missed it somehow. > ``` > step s0_reset: SELECT pg_replication_origin_session_reset(); > ERROR: cannot reset replication origin with ID 1 because it is still in = use by other processes > step s1_reset: SELECT pg_replication_origin_session_reset(); > pg_replication_origin_session_reset > ----------------------------------- > > (1 row) > ``` > > Others are corrected and adjusted by me, see the attached. > 0001 and 0002 are combined because no one claimed them. > Thanks. The patch LGTM. thanks Shveta