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 1vq2h4-003O4D-1C for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 05:23:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vq2h3-002YsD-21 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 05:23:18 +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 1vq2h3-002Ys3-15 for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 05:23:18 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vq2h2-000000006Gu-10eE for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 05:23:17 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-59de38466c2so5929590e87.0 for ; Tue, 10 Feb 2026 21:23:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770787395; cv=none; d=google.com; s=arc-20240605; b=C8nTxqLQFYJUItnB386chEPAMrjp+VwMuxspfzeEMhTfz+BFSaR4NtvBxpdBvbvagx LDxRum3q0vjBvvii5NbZzI1lJbfu3BNoUVehiqf+iQuzhYRcgf4u+6OwBqhFky5cxcCf 09SUIPFNnPFSN/1OiH/6Fjvu9d6LEYov5sGQsQ3b4eK3dpZR/X7gT/rQz5b1Rsn2D9vn FD2j6QFrPOoGOB7g2c6at0stBCDUSBJnGjhSzvTWPkuHxhOdt+tJu9dTI2CluGr8IpoT j9+B9rE5/T1rJKlb08s5UBEgRjzHpqUtoMTpLGLcNjaU+H2O4j6gN+9SIp8mdD0liObE jsWA== 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=O2Z9VBRSlo22jV/YhRu6TWO2DostiIeyCjekYFgtQck=; fh=tU2Eblj3FUmUjcNzBx+bb9TvZ142c61QxBfT5aA5ql4=; b=ENtQNFNLi/AAsmYHQVfHu+XtDSN/jTj0mGJlVhEcV/eIpwbjV4jygQLfnT9UnzVmx0 NCbE63ThVxpou00Z47ulgwqtIvJOG4of9rubAkTL1qMwBuHqzYDcXwRBN5wIQnecmZT6 9mFwojJP9696Nf+MShn71N7SbT7wSFcis0tqgxV6mo8PgfoYnJTOcqZVu+YXpF7JeRT1 LbUjoKEp6yvVVhC/7Ak5Lpae80wNWmlPef7/VcZB2s28SBufQx8QU91e3uLgW+KIGRtW UShC4mK9KfXqc+Wg2AjRP8oOVkEuCMY1ccvPhPXXr0LKnuBnp+x2Du0IbctRos++2EpL 3wNA==; 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=20230601; t=1770787395; x=1771392195; 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=O2Z9VBRSlo22jV/YhRu6TWO2DostiIeyCjekYFgtQck=; b=PT30pg7e0DRsNU9t8Iv6lO37nqx2f5Sn5EUeFqxs+qourY7RI+/X2ZjRUV4mxX2wL2 dXfNTZMBOiikPhUTk9jI4sVnpeTomcGZ2wcb/sbzUCQA+byTZhv8dVdrLuuXC+a0LpXb cRTfoZpm0Vk1VgqmZdGfuzUxVAl96WSQRvuV8guoyLBEvZ575ixMTi0ggLE8ncuBupCr xkMc4XerIRevk7FyzC0UsVQyU8DleOwF3G2oqK70U2r+Hj0scmC6MuuJ58DZkpsMhh8T jWnFBkkei4nXJ3Q7Qb1eXn/CZJWvr1Kg5nNC9zbWr+961XmecxBbw8e+7Jlr0AAEgc7H H1zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770787395; x=1771392195; 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=O2Z9VBRSlo22jV/YhRu6TWO2DostiIeyCjekYFgtQck=; b=wEqJr+RnoAZ8yxHsKSkFGX+IoTTmg3zPFJZY58mo0gnr0AfmL+l3wZNJ2DdYkOk0Fx AIUvO7Kyxk9wS9M4RyY5sZZuZbNP4FEKQvxy4odnKf02A4Fh9LUKM8HsQVGcbz10tuVw OWRV8mgRm+PAyzSG0ScvA6Y9rVJr663KFhxwU552uPnoO5nwyh39FgatOBvu9+HKn85c fesIoMkwazFfT26JDLFZZhcncof5kZxoGQf5rWg4DDAvi4mWlj89QfxWpNLvZELQEZ5v 2zH6jAlnSP16res1WwCYlaibwI3B+GSAl3a3SPbIlwJa4riBlGJGdPhp4xou6VeUDflI B+RQ== X-Forwarded-Encrypted: i=1; AJvYcCWf1TpAzh8yuWpzgJxSKMb7rkyUUhu6mkf6pSxrsdkgmNVpjjmzPr577Jib2lE0EIL8v4rA2C9Ek54Zo0PA@lists.postgresql.org X-Gm-Message-State: AOJu0YyLFiW8YBY47+wql6mSmeZ7CFFdVD7CaNiVZqu6wmFhiHApaVAj Hiu0npMJ2UHirsruRpYEW97IZIGfnCZ7DlNJn96zdOD+sbwR/ABFKJ712goQTLVUvidqi6wKidv XNmfMNTax6sjpt1f5Fi16YJnWPcJ0pXc= X-Gm-Gg: AZuq6aLiJlVUScu1RuHlOBKJrnjnPpG8NiUiK8E25gZYjvP7Aomnklu02tBTWFezs4S H8+YuG3IbktsZvV2xZJ0ExyeGl/soJ4iz7E8trAGJr8mU/776EcIsNBtlrAQeIQ3lA6sNIjY1Id k4Uf3rFJi8cEX6ULiICiHFVzIt3RvB2JvumtnBo1zrJu5Y1Lv3eKR+kGNNyXseq2WfOWK5gR2Vi 09Yy7jYcgmge36+D3uH97+LUUKTHRhdaE5rm03JwqQ9cbE1FwlUji6v93F3l547AHcEpsntNOJL YhW3dDTZr0HBiGph0D6453LGyZSKPOGa5yz4YpOwfkMV3/q9vt3CIZW5A7o1IG5CJ0wQCrsK X-Received: by 2002:a05:6512:8002:20b0:59e:5c8f:75fb with SMTP id 2adb3069b0e04-59e5c8f7676mr341555e87.34.1770787394981; Tue, 10 Feb 2026 21:23:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 11 Feb 2026 10:53:02 +0530 X-Gm-Features: AZwV_QhALLEms5YCmdGdfuMv5vzGSIQZPr7KielHBVp0N1m8ANcNYwNnwIGZ03w Message-ID: Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup To: Heikki Linnakangas Cc: "Hayato Kuroda (Fujitsu)" , shveta malik , "pgsql-hackers@lists.postgresql.org" , "Zhijie Hou (Fujitsu)" , Doruk Yilmaz 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, Feb 4, 2026 at 12:38=E2=80=AFAM Heikki Linnakangas wrote: > > The new error message is not great: > > postgres=3D# select pg_replication_origin_session_setup('myorigin', 12345= 678); > ERROR: could not find replication state slot for replication origin > with OID 1 which was acquired by 12345678 > > Firstly, replication origin is not an OID. Secondly, it's a little > confusing because the "replication state slot" is in fact present. > However, it's currently inactive, i.e. not "acquired" by the given PID. > > I propose to change that to: > > postgres=3D# select pg_replication_origin_session_setup('myorigin', 12345= 678); > ERROR: replication origin with ID 1 is not active for PID 12345678 > > That's more in line with this neighboring message: > > ERROR: replication origin with ID 1 is already active for PID 701228 > +1 for the new message. > > I also wonder if the error code is appropriate. That error uses > ERRCODE_OBJECT_IN_USE, but if the problem is that the origin is > currently *not* active, that seems backwards. I didn't change that in > the attached patch, but it's something to think about. > The other way to look at this is that the origin is already active for some other pid which is not the same as what is given by the user in the second parameter, so OBJECT_IN_USE sounds okay from that angle. --=20 With Regards, Amit Kapila.