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 1rnHbK-00CUxS-Mz for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Mar 2024 12:32:55 +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 1rnHbJ-00D6uG-5G for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Mar 2024 12:32:53 +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 1rnHbI-00D6u5-5d for pgsql-hackers@lists.postgresql.org; Thu, 21 Mar 2024 12:32:53 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rnHbA-005j1d-VD for pgsql-hackers@lists.postgresql.org; Thu, 21 Mar 2024 12:32:52 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 1318E11400D9; Thu, 21 Mar 2024 08:32:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 21 Mar 2024 08:32:43 -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=1711024363; x=1711110763; bh=L1dU0ZeXcj1N3dj5VAb4qQ//8LP7TApp NS8f6GQcus4=; b=R+TEbmV78VutWgn8tECYHxADUZzbt0PHd4P+zpuONVHLpeCI Kapdwea5wzmamcjfQwX7LwKRcykm+dCY8khWeMb2YrcbNpIBbwySc3BEFA3kUGZi ZiGNAvrX6DKt0l5GsiorGvBeP56deD9fpSz++HJ29n0YJzK7M1pZZ0Jp863iSDk4 CbO29PlB+q9ukWp32Aq6L2QnUDGXYnYnL0jtXKO5S7ISLhXlVzRf5iSL7dcpKOYb VqGwUxeFrTeKbOSb+s4izvuh54WQv/hOG7cfnUE5OVuuLJ1R7VIyQiGNRx7t1s6E 2tLNygAseqzM1c/QN5JdfBZXQ5PpvADkQhXQRg== 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=1711024363; x= 1711110763; bh=L1dU0ZeXcj1N3dj5VAb4qQ//8LP7TAppNS8f6GQcus4=; b=B OsnNWRWJcSZST8DLT5VZQpQcUNEpzb30cVP3rbuksUcmQRh9sjudxeeS+LgPm+TK otK03z23caTXzRIv+2GkjvElUq5ROhGwc3IdmtNOvedRDrF+6zqKnrIHf+R7t3TE mE1emazgVZSY6/MteIER1qwMa82AmB1V02Cp6r2jVQgLw4RkY7mkQfKoOe/SUUb6 5Kve2effy9+KnTGMJp4iTG8rEAZHfioexVb1p51GkuUM24GkbPE7B3YvTawjjRFf K+zzmL9MeAoNHoaus+Z3x/rIlDLBvyplaaBSTIkSZslyivYDsfnMeNLE9RKxfPsM HpueopBR8GgUIVQUfzwEQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrleeigdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Mar 2024 08:32:41 -0400 (EDT) Message-ID: <60b45b8a-3047-4a21-ba2a-ddb15daa638f@eisentraut.org> Date: Thu, 21 Mar 2024 13:32:39 +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> <7a970912-0b77-4942-84f7-2c9ca0bc05a5@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 21.03.24 12:35, vignesh C wrote: > Here are a few suggestions: > 1) I felt displaying the server log to the console is not a good idea, > I prefer this to be logged. There were similar comments from > Kuroda-san at [1], Peter at [2]. The number of lines will increase > based on the log level set. If you don't want to use pg_upgrade style, > how about exposing the log file option and logging it to the specified > log file. Let's leave that for the next version. We need to wrap things up for this release. > 2) Currently for publication, replication-slot and subscription, we > will have to specify these options based on the number of databases. > Here if we have 100 databases we will have to specify these options > 100 times, it might not be user friendly. How about something like > what Tomas had proposed at [3] and Amit proposed at [4]. It will be > better if the user has to just specify publication, replication slot > and subscription options only one time. Same. Designing, implementing, discussing, and testing this cannot be done in the time remaining. > + /* Number of object names must match number of databases */ > + if (num_pubs > 0 && num_pubs != num_dbs) > + { > + pg_log_error("wrong number of publication names"); > + pg_log_error_hint("Number of publication names (%d) > must match number of database names (%d).", > + num_pubs, num_dbs); > + exit(1); > + } > > 3) Can we have an option similar to dry-run which will display the > configurations required in the primary and standby node something > like: > pg_createsubscriber -D data_N2/ -P "port=5431 user=postgres" -p 9999 > -s /home/vignesh/postgres/inst/bin/ -U postgres -d db1 -d db2 > --suggest-config > Suggested optimal configurations in the primary: > -------------------------------------- > wallevel = logical > max_replication_slots = 3 > max_wal_senders = 3 > ... > Suggested optimal configurations in the standby: > -------------------------------------- > max_replication_slots = 3 > max_wal_senders = 3 > ... How would this be different from what --dry-run does now?