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 1rcEwd-001jqB-B7 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 01:29:15 +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 1rcEwb-000DGk-UF for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 01:29:13 +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 1rcEwa-000DGc-83 for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 01:29:13 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rcEwX-007bsd-AH for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 01:29:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 47DE13200A3C; Mon, 19 Feb 2024 20:29:06 -0500 (EST) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Mon, 19 Feb 2024 20:29:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc: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=fm2; t=1708392545; x=1708478945; bh=nvEHOdRaO5 1/KeSZGHibWYgvMHRaSlf3Mn3XP0yrll4=; b=2TQKZVOBCfJQTYcvYuvZ3HWNzn IJKm5TBAdD7GA5FOxi0bCOGP8H00/qoL0G96LjAbmyJniBNNVGfbOFN0TbrpEpyL zzmyT9bayQgSYqS53+IGAJQPrpjEBHWdK/aZu593nC5kWKgOQraSCE1qqWGWGiDz My59tfRTZD0WgV6+5Tf0xgHr8+7xFeAF312aQpsg1ZHvMOaCbEDKvWHbQFXbIDsW j6tzb4PIADaU0wJSJhQJfo0Bo96KcztDs8sNxU7ynWGfIWbRRY5x0WytwcZGgbK3 4t1yfGWIelb3+b3cEx7lEprXPWW0DVY5k0A7/hrc5T7L2yck2dAt+3CE2cHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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= fm1; t=1708392545; x=1708478945; bh=nvEHOdRaO51/KeSZGHibWYgvMHRa Slf3Mn3XP0yrll4=; b=R4Vra3G1VLNBgnf4tzx7NBfouo8x/gL6o4boAVESn25c qlQD4Mc0eVUFd4zr3GAFwMjj3b9bKnzhChVm3+I6LFl9DFh/lp/nXeF6idERehCP bDT1B9zv//iKPmyjHguBouJnzQjAD54O5PhH75mBx3h52mm2+xvhF1H/M43ZXNdu igiQ+25980IPc9KNaMPLkj0Lu03YtQM5aMdB9fybN2vO8NY4DkW9jg8FOUiq1d0h KZ4hcWpJQS89qDX8XK8bjmH2q8081Nmmvy3kwC1r6TYPVuMflVydnLKQat8zcYuW l+TsTRmaAjmaeaqaqn39lGWD424Cq8/XFTOvGQS3dQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreertdenucfhrhhomhepfdfguhhl vghrucfvrghvvghirhgrfdcuoegvuhhlvghrsegvuhhlvghrthhordgtohhmqeenucggtf frrghtthgvrhhnpeehvdevueeljeekfeeliefhfeefgfffgeeufefhvdeugedttdegvdeh uedvgfdugfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpdgvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegvuhhlvghrsegvuhhlvghrthhordgtohhm X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 58B1315A0092; Mon, 19 Feb 2024 20:29:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-153-g7e3bb84806-fm-20240215.007-g7e3bb848 MIME-Version: 1.0 Message-Id: <79088f3e-7b9d-4059-9b36-e5ee0bc3889b@app.fastmail.com> In-Reply-To: References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com> <8d8d9960-8130-4216-b0e4-adf36b8b1c43@app.fastmail.com> <370673e8-e2da-4249-8f07-cb67e9d9c20e@app.fastmail.com> <34075bd4-c85d-4654-a782-0cd6713b2c89@app.fastmail.com> <2edde173-5ff9-45fd-b881-cd04eb13049f@app.fastmail.com> <2231a04b-f2d4-4a4e-b5cd-56be8b002427@app.fastmail.com> Date: Mon, 19 Feb 2024 22:28:17 -0300 From: "Euler Taveira" To: "Shlok Kyal" Cc: "kuroda.hayato@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" , "vignesh C" , "Michael Paquier" , "Peter Eisentraut" , "Andres Freund" , "Ashutosh Bapat" , "Amit Kapila" , =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= Subject: Re: speed up a logical replica setup Content-Type: multipart/alternative; boundary=221d4c9de4fa4d72afe4f34ef8838e22 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --221d4c9de4fa4d72afe4f34ef8838e22 Content-Type: text/plain On Mon, Feb 19, 2024, at 7:22 AM, Shlok Kyal wrote: > I have reviewed the v21 patch. And found an issue. > > Initially I started the standby server with a new postgresql.conf file > (not the default postgresql.conf that is present in the instance). > pg_ctl -D ../standby start -o "-c config_file=/new_path/postgresql.conf" > > And I have made 'max_replication_slots = 1' in new postgresql.conf and > made 'max_replication_slots = 0' in the default postgresql.conf file. > Now when we run pg_createsubscriber on standby we get error: > pg_createsubscriber: error: could not set replication progress for the > subscription "pg_createsubscriber_5_242843": ERROR: cannot query or > manipulate replication origin when max_replication_slots = 0 That's by design. See [1]. The max_replication_slots parameter is used as the maximum number of subscriptions on the server. > NOTICE: dropped replication slot "pg_createsubscriber_5_242843" on publisher > pg_createsubscriber: error: could not drop publication > "pg_createsubscriber_5" on database "postgres": ERROR: publication > "pg_createsubscriber_5" does not exist > pg_createsubscriber: error: could not drop replication slot > "pg_createsubscriber_5_242843" on database "postgres": ERROR: > replication slot "pg_createsubscriber_5_242843" does not exist That's a bug and should be fixed. [1] https://www.postgresql.org/docs/current/runtime-config-replication.html#RUNTIME-CONFIG-REPLICATION-SUBSCRIBER -- Euler Taveira EDB https://www.enterprisedb.com/ --221d4c9de4fa4d72afe4f34ef8838e22 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Mon, Feb 19,= 2024, at 7:22 AM, Shlok Kyal wrote:
I have reviewed the v21 patch. And found an is= sue.

Initially I started the standby server= with a new postgresql.conf file
(not the default postgres= ql.conf that is present in the instance).
pg_ctl -D ../sta= ndby start -o "-c config_file=3D/new_path/postgresql.conf"

And I have made 'max_replication_slots =3D 1' in new pos= tgresql.conf and
made  'max_replication_slots =3D 0' = in the default postgresql.conf file.
Now when we run pg_cr= eatesubscriber on standby we get error:
pg_createsubscribe= r: error: could not set replication progress for the
subsc= ription "pg_createsubscriber_5_242843": ERROR:  cannot query or
=
manipulate replication origin when max_replication_slots =3D = 0

That's by design. See [1]. T= he max_replication_slots parameter is used as the
maximum = number of subscriptions on the server.

NOTICE:  dropped replica= tion slot "pg_createsubscriber_5_242843" on publisher
pg_c= reatesubscriber: error: could not drop publication
"pg_cre= atesubscriber_5" on database "postgres": ERROR:  publication
"pg_createsubscriber_5" does not exist
pg_createsu= bscriber: error: could not drop replication slot
"pg_creat= esubscriber_5_242843" on database "postgres": ERROR:
repli= cation slot "pg_createsubscriber_5_242843" does not exist

That's a bug and should be fixed.
=
[1] 

--221d4c9de4fa4d72afe4f34ef8838e22--