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 1rmApM-006Szk-EX for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Mar 2024 11:06:49 +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 1rmApK-000Vha-6k for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Mar 2024 11:06:46 +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 1rmApI-000VhR-IS for pgsql-hackers@lists.postgresql.org; Mon, 18 Mar 2024 11:06:46 +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 1rmApA-005AbZ-22 for pgsql-hackers@lists.postgresql.org; Mon, 18 Mar 2024 11:06:43 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id D578C11400D6; Mon, 18 Mar 2024 07:06:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 18 Mar 2024 07:06:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=1710759993; x=1710846393; bh=0mD5Rlb9CIqfqbxrUDiXo9mAl/j6FOxk QtQ1X6+Hg3U=; b=CCVjshlxLWnP6vu9zKXGOzINqUJloQE1bY96mMaBumgVgWpW 94B48GUqarZ3UJ5IP/KQ3kw7NtuAl2rOgm2Xzc8/+Zs5xsBl1aUr0K3aMIOofDLM jfIfGfBoUHE5dmLbe+rp0OP3FWdLSLB2JsA5GladZEpy3pXkb3j7zznapXO3Uvq1 dDrv/FT0c8oLnygQoCDAouEWctWfbSAkugBzOVIjawVHeR4CN8EuRlcySwjTlr5p saWyPuSIirZ5YLnSqp9EibYDT6qBnMUalCTagBFtlv4i+8j/EpHdsvce72Siv+r/ 3u0Mqxb5+4lfSnvtUUyWorn2xEEhoW8i4fKQBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm2; t=1710759993; x= 1710846393; bh=0mD5Rlb9CIqfqbxrUDiXo9mAl/j6FOxkQtQ1X6+Hg3U=; b=q fwEtc9ALCWs+epfeAJI6bLJTxhjmcDCKmOgXje2Eu0hJXpF5+b+dAk2nSd4gq7Qj 1L/A8djRsnvOV2epseB5vU9fyySqTzHGF6JbQV9bquy4lNWZtLejT9lftQJbtAgt xK0yfShOG8p7Ljg2uguN224roMV3ZQJs4n4tRzdNHAD/+4CUOeXcXTnnA5xzXiav x2lea+r4jUKYxEetfXF4TfMuQyIu5rCZRmC/j4D5l8D7oY3su02YCuFS+xqR3r8j AqQj88hy94DkqLJEuwNd+VSPIKOARUpgFa6yYM7j/HmspFN/SnQDu4bR7zn5npra xmLcV1AhQNRf35UoEXubQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeejgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 07:06:31 -0400 (EDT) Message-ID: <96a45e74-bd83-422b-bad3-acb52d0ff5f4@eisentraut.org> Date: Mon, 18 Mar 2024 12:06:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: speed up a logical replica setup Content-Language: en-US To: vignesh C , Euler Taveira Cc: Amit Kapila , Shlok Kyal , "kuroda.hayato@fujitsu.com" , Tomas Vondra , "pgsql-hackers@lists.postgresql.org" , Michael Paquier , Andres Freund , Ashutosh Bapat , =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com> <40595e73-c7e1-463a-b8be-49792e870007@app.fastmail.com> <6423dfeb-a729-45d3-b71e-7bf1b3adb0c9@enterprisedb.com> <2f0b73f3-e7c0-4e95-9712-1993442a6b64@app.fastmail.com> <34637e7f-0330-420d-8f45-1d022962d2fe@app.fastmail.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.03.24 08:18, vignesh C wrote: > 1) Maximum size of the object name is 64, we can have a check so that > we don't specify more than the maximum allowed length: > + case 3: > + if (!simple_string_list_member(&opt.replslot_names, optarg)) > + { > + simple_string_list_append(&opt.replslot_names, optarg); > + num_replslots++; > + } > + else > + { > + pg_log_error("duplicate replication slot \"%s\"", optarg); > + exit(1); > + } > + break; > > If we allow something like this: > ./pg_createsubscriber -U postgres -D data_N2/ -P "port=5431 > user=postgres" -p 5432 -s /home/vignesh/postgres/inst/bin/ -d db1 -d > db2 -d db3 --replication-slot="testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes1" > --replication-slot="testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes2" > --replication-slot="testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes3" > In this case creation of replication slot will fail: > pg_createsubscriber: error: could not create replication slot > "testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes" on > database "db2": ERROR: replication slot > "testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes" > already exists I think this is fine. The server can check whether the names it is given are of the right size. We don't need to check it again in the client. > 2) Similarly here too: > + case 4: > + if (!simple_string_list_member(&opt.sub_names, optarg)) > + { > + simple_string_list_append(&opt.sub_names, optarg); > + num_subs++; > + } > + else > + { > + pg_log_error("duplicate subscription \"%s\"", optarg); > + exit(1); > + } > + break; > > If we allow something like this: > ./pg_createsubscriber -U postgres -D data_N2/ -P "port=5431 > user=postgres" -p 5432 -s /home/vignesh/postgres/inst/bin/ -d db1 -d > db2 -d db3 --subscription=testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes1 > --subscription=testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes2 > --subscription=testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttes3 > > Subscriptions will be created with the same name and later there will > be a problem when setting replication progress as there will be > multiple subscriptions with the same name. Could you clarify this problem?