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 1rmcBD-008vJs-Is for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 16:19:12 +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 1rmcBB-00Gq11-Fo for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 16:19:09 +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.94.2) (envelope-from ) id 1rmcBB-00Gq0s-62 for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 16:19:09 +0000 Received: from wfhigh4-smtp.messagingengine.com ([64.147.123.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmcB6-005Lfe-Lv for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 16:19:08 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 9E0A918000BA; Tue, 19 Mar 2024 12:19:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 19 Mar 2024 12:19:04 -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=1710865143; x=1710951543; bh=jNA0riakeKhGIOLOJk1w8xG51GDAku6V F/61i97pOdU=; b=f2L2RHdjhYuyDQY7EDQwU5k5+CT5OoFfmBe6q7WY8/lKnw+a F6K2HG5TPdvXtGdWAz28avdnE9ZgT1hgYYVNxnGIYbYoqpehz3EDIwNMw9IF4kPP KTYmt2dyKuna06QvCVzveg7eD1GcPC9ue9SMdLnn4nEfnzfyXO6m49K1cT1l+s4A EKBjCDCxBxnTPHJ92ThOEIDxK54B/NTCWJ8ZB+Q4HD5o2WQbnWH5gWzj0PH50kDb 8ayQE/fttKa5gXFpXfnOo5E/M2YNjh47jklwrRhjKVhkjhmECJyGmltciJChdiYu 02azCblcb+o0Cnj9ZGJLhEJ41GPVmrlVYdHuKw== 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=1710865143; x= 1710951543; bh=jNA0riakeKhGIOLOJk1w8xG51GDAku6VF/61i97pOdU=; b=t 4gnL3fwHsvjBrqmt9dZlE4KBwkJMqV2jy8Xq4QfsfX3oDaUNN2/+x8gWC8qWv22y biSxBanKB+Ox5+awsvPBCGpqG/7NFg8niqh3oKtkrsOJItdZa00zW/3kDe5HRYIU Gc2k9gvjW0yIOekUJhkmIb0d2Jiqt14mshoGngl0r8UaT0t5IQcFQ+n2gA9HCTxc fAMGHTeiYe1eerY2QTe+eIxylXYChineXllNTLvARk968TKf3KT0PmfCHNu5V2Gj OR6cnLNoxhcRruDlWAyU358L382NnJOrJOXTflE9CLHHqfPvkDjaetuDS8XCXkUw VyYExNV7UjitcaAW9Qwzw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrledtgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Mar 2024 12:19:01 -0400 (EDT) Message-ID: Date: Tue, 19 Mar 2024 17:19:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: speed up a logical replica setup Content-Language: en-US To: vignesh C Cc: Euler Taveira , 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> <96a45e74-bd83-422b-bad3-acb52d0ff5f4@eisentraut.org> 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 19.03.24 16:24, vignesh C wrote: > The problem with this failure is that standby has been promoted > already and we will have to re-create the physica replica again. > > If you are not planning to have the checks for name length, this could > alternatively be fixed by including database id also while querying > pg_subscription like below in set_replication_progress function: > appendPQExpBuffer(str, > "SELECT oid FROM pg_catalog.pg_subscription \n" > "WHERE subname = '%s' AND subdbid = (SELECT oid FROM > pg_catalog.pg_database WHERE datname = '%s')", > dbinfo->subname, > dbinfo->dbname); Yes, this is more correct anyway, because subscription names are per-database, not global. So you should be able to make pg_createsubscriber use the same subscription name for each database.