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.94.2) (envelope-from ) id 1sdcuJ-00H8vZ-CL for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Aug 2024 21:48:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sdcuH-000Omr-BR for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Aug 2024 21:48:49 +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.94.2) (envelope-from ) id 1sdcuF-000Omj-5P for pgsql-hackers@lists.postgresql.org; Mon, 12 Aug 2024 21:48:49 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdcu9-004X6c-Sp for pgsql-hackers@lists.postgresql.org; Mon, 12 Aug 2024 21:48:46 +0000 Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 703981150A86 for ; Mon, 12 Aug 2024 17:48:38 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by phl-compute-03.internal (MEProxy); Mon, 12 Aug 2024 17:48:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1723499318; x=1723585718; bh=LhUKBuphrM 8O+hn0FlIfngsEifzh2x4lvk+Vb6R37Xk=; b=wqMX2uhGXCBsepnRIISiSemePW PflPuihfeh1JzcoK87Io2fiX7uU7iitOpZKpVOxBTDaoLU7DoViYQ+OGJp9EpzrR 0Gv2CnV6rN+hREEpCxLvFB8H7IFe142QMwBtMaiFk2xM+5fKCmf/FkoWE0kthXYU oPnpjeonZ0VpILEQn644vDv+c6HuvHhLVBROm9094bWcIIuIlG6b5pWABTtAb5Me 7pIFChd51a8+0f55yn8Mz8+bFz49KvwDyHUephhHRjyh8cM68bDkDO1ah1Fv7ZtS OjgfjyMOIzymbKQmsObVpDsqWP7k/wB8tK4vPdzS788wcqbITRy8nG58wrdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1723499318; x=1723585718; bh=LhUKBuphrM8O+hn0FlIfngsEifzh 2x4lvk+Vb6R37Xk=; b=B1XMRU67ADrhu6zPhRgfV2t5cR7hI3j63+r51ht/Y/PM LyQprfT4oXBzIGiDlt4MDX8034aPsc3oCpFdD6VEiGmIa3hrgMkqalAFSmFjsVO1 W3GKuByJdY9AD5NkPYwgVrA0xM9P5QoU/8ItnLE20xkuH6RP95vbP+LPkUq723XP lC45ZIg1FFOeoqYgit+tOSv9Y0HhiRa27ztZ+oC4CLjs8Mm2au428+Lyre1cDV8w 1QcrnNpHv9cjfXtPxIt8B3BGxTmHC9IPdB3HkVB9LWVXGHNlxy/3q2I/wnhQbf0y nImgfPuPVWlPz3fnR561+XrpE8vKA4EyndohZYwKqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtuddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgesrgdtreerredttdenucfhrhhomhepfdfguhhlvghrucfvrghvvghirhgr fdcuoegvuhhlvghrsegvuhhlvghrthhordgtohhmqeenucggtffrrghtthgvrhhnpeetff euffdulefhieektdduuefffeeiffelleeghfegffefgfejudeljeehhfeghfenucffohhm rghinhepphhoshhtghhrvghsqhhlrdhorhhgpdgtphhuthhusggvrdhorhhgpdgvnhhtvg hrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegvuhhlvghrsegvuhhlvghrthhordgtohhmpdhnsggprhgtphhtth hopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgv rhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id F24B415A0092; Mon, 12 Aug 2024 17:48:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Mon, 12 Aug 2024 18:48:17 -0300 From: "Euler Taveira" To: pgsql-hackers@lists.postgresql.org Message-Id: In-Reply-To: References: Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup Content-Type: multipart/alternative; boundary=11f91cb14eb64e5b8382f64bd25c266f List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --11f91cb14eb64e5b8382f64bd25c266f Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Aug 12, 2024, at 3:43 PM, Doruk Yilmaz wrote: > Hello all, Hi! > While working on our internal tools that utilise replication, we > realised that a new parameter was added to the internal C function > corresponding to pg_replication_origin_session_setup. > However this parameter wasn't included in the user-facing API [1]. I'm curious about your use case. Is it just because the internal function has a different signature or your tool is capable of apply logical replication changes in parallel using the SQL API? > I made this patch to the master which adds a way to control this > parameter by adding a new version of the > pg_replication_origin_session_setup function with user facing > parameters 'text int4' in place of the current 'text' while keeping > the existing variant > (ensuring backwards compatibility). Could someone take a look at it? I did a quick look at your patch and have a few suggestions. * no documentation changes. Since the function you are changing has a new signature, this change should be reflected in the documentation. * no need for a new internal function. The second parameter (PID) can be optional and defaults to 0 in this case. See how we changed the pg_create_logical_replication_slot along the years add some IN parameters like twophase and failover in the recent versions. * add a CF entry [1] for this patch so we don't forget it. Another advantage is that this patch is covered by CI [2][3]. [1] https://commitfest.postgresql.org/49/ [2] https://wiki.postgresql.org/wiki/Cfbot [3] http://cfbot.cputube.org/index.html -- Euler Taveira EDB https://www.enterprisedb.com/ --11f91cb14eb64e5b8382f64bd25c266f Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Mon, Aug 12,= 2024, at 3:43 PM, Doruk Yilmaz wrote:
Hello all,

Hi!

While working on our internal tools that utilise replicatio= n, we
realised that a new parameter was added to the inter= nal C function
corresponding to pg_replication_origin_sess= ion_setup.
However this parameter wasn't included in the u= ser-facing API [1].

I'm curiou= s about your use case. Is it just because the internal function has a
different signature or your tool is capable of apply logical= replication changes
in parallel using the SQL API?

I = made this patch to the master which adds a way to control this
=
parameter by adding a new version of the
pg_replicati= on_origin_session_setup function with user facing
paramete= rs 'text int4' in place of the current 'text' while keeping
the existing variant
(ensuring backwards compatibility).= Could someone take a look at it?

<= div>I did a quick look at your patch and have a few suggestions.

* no documentation changes. Since the function you= are changing has a new
signature, this change should be r= eflected in the documentation.
* no need for a new interna= l function. The second parameter (PID) can be
optional and= defaults to 0 in this case. See how we changed the
pg_cre= ate_logical_replication_slot along the years add some IN parameters like=
twophase and failover in the recent versions.
* add a CF entry [1] for this patch so we don't forget it. Another ad= vantage is
that this patch is covered by CI [2][3].


<= div>[2] https://wiki.= postgresql.org/wiki/Cfbot

= --11f91cb14eb64e5b8382f64bd25c266f--