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 1ra5SU-007zz7-Nh for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 02:57: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 1ra5SS-003Wia-MO for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 02:57:12 +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 1ra5SR-003WiS-PD for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2024 02:57:12 +0000 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ra5SN-0075LW-V4 for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2024 02:57:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id A43C3138010B; Tue, 13 Feb 2024 21:57:04 -0500 (EST) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Tue, 13 Feb 2024 21:57:04 -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=fm1; t=1707879424; x=1707965824; bh=EuBwvrb7yS UegnbfkhZdK2tv8kGK+/YIskCGY0MaTW8=; b=FUnUUCnUl+HRpOt2u4Jzu8Huaj awyo2w7KrYC5Re+BYPcd4Cm6u3En//dBYLoUp2m1uHJdrFekuyKxwy4xSKCgm1ij yjSTA9Vjl1glPaM/H11sCjgqTdUADTUuNORUUAj+LgwQEOl23Re0kdkzpaDx+lYp M6BP3LTeTFtJMU5Vu5Y+F4UC2Qz77VWYPX5qZu351QtcaqIkXQqjmkeA/NDCPVTf SJ0R74/42qd6pUMpfOjHMn2EnB4haxyAryBfTWg1Sc+F1BHx/izwoKQ/55MiGboi Q6RAixuzKc3aXLV/TdydoZwbXHiukiMnBZa7imocLx9X/Bm+QySJshKZRMGw== 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= fm3; t=1707879424; x=1707965824; bh=EuBwvrb7ySUegnbfkhZdK2tv8kGK +/YIskCGY0MaTW8=; b=dHj9aASdzY3Bs6MdpGY8befDR/0O8uXXFWXgDvgGFJL0 u7XzJVFUHGJ0O/XnLtipo6u05kq0qLJZ0cP/WHlv2+NhTrHUEoS4AUpSEOTdm/Nj zEbpYRgd+VKnkSzhjdlwUCWyTotkzrpz/y3RtMRDnU6m3q8feFgCUKyg+byqWxrz 4eEBU6YKLKZ7397PSE71vOIQtfK77Y0W6lH2On59oYCttMVIP8b/VgZa6VTLtmeX 2sKtPN8lJKNjDhO9Bgbw2b3wN63h/r7D14pfrtlh0bw69J90jKze2R4Pd1YnDw76 X6XcvexFvT7jbv/L7mMgnUAFPZdAfKYMmunX++fcDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeigdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreertdenucfhrhhomhepfdfguhhl vghrucfvrghvvghirhgrfdcuoegvuhhlvghrsegvuhhlvghrthhordgtohhmqeenucggtf frrghtthgvrhhnpefgffejvdeivdekvdeivdetudeikeduieevtdfhhfduvdetgeelteei ffekgefhvdenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepvghulhgvrhesvghu lhgvrhhtohdrtghomh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3AE0C15A0093; Tue, 13 Feb 2024 21:57:04 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 MIME-Version: 1.0 Message-Id: <2edde173-5ff9-45fd-b881-cd04eb13049f@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> Date: Tue, 13 Feb 2024 23:56:43 -0300 From: "Euler Taveira" To: "kuroda.hayato@fujitsu.com" Cc: "pgsql-hackers@lists.postgresql.org" , "vignesh C" , "Michael Paquier" , "Peter Eisentraut" , "Andres Freund" , "Ashutosh Bapat" , "Amit Kapila" , "Shlok Kyal" , =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= Subject: Re: speed up a logical replica setup Content-Type: multipart/alternative; boundary=71a48a97ccbc461fae7590d458dbc01c List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --71a48a97ccbc461fae7590d458dbc01c Content-Type: text/plain On Thu, Feb 8, 2024, at 12:04 AM, Hayato Kuroda (Fujitsu) wrote: > > > Remember the target server was a standby (read only access). I don't expect an > application trying to modify it; unless it is a buggy application. > > > > What if the client modifies the data just after the promotion? > Naively considered, all the changes can be accepted, but are there any issues? If someone modifies data after promotion, fine; she has to deal with conflicts, if any. IMO it is solved adding one or two sentences in the documentation. > > > Regarding > GUCs, almost all of them is PGC_POSTMASTER (so it cannot be modified unless the > server is restarted). The ones that are not PGC_POSTMASTER, does not affect the > pg_createsubscriber execution [1]. > > > > IIUC, primary_conninfo and primary_slot_name is PGC_SIGHUP. Ditto. > > > I'm just pointing out that this case is a different from pg_upgrade (from which > this idea was taken). I'm not saying that's a bad idea. I'm just arguing that > you might be preventing some access read only access (monitoring) when it is > perfectly fine to connect to the database and execute queries. As I said > before, the current UI allows anyone to setup the standby to accept only local > connections. Of course, it is an extra step but it is possible. However, once > you apply v16-0007, there is no option but use only local connection during the > transformation. Is it an acceptable limitation? > > > > My remained concern is written above. If they do not problematic we may not have > to restrict them for now. At that time, changes > > 1) overwriting a port number, > 2) setting listen_addresses = '' It can be implemented later if people are excited by it. > are not needed, right? IIUC inconsistency of -P may be still problematic. I still think we shouldn't have only the transformed primary_conninfo as option. > > > pglogical_create_subscriber does nothing [2][3]. > > > > Oh, thanks. > Just to confirm - pglogical set shared_preload_libraries to '', should we follow or not? The in-core logical replication does not require any library to be loaded. -- Euler Taveira EDB https://www.enterprisedb.com/ --71a48a97ccbc461fae7590d458dbc01c Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Thu, Fe= b 8, 2024, at 12:04 AM, Hayato Kuroda (Fujitsu) wrote:
>
Remember = the target server was a standby (read only access). I don't expect an
application trying to modify it; unless it is a buggy applic= ation.
>

What if the clien= t modifies the data just after the promotion?
Naively cons= idered, all the changes can be accepted, but are there any issues?

If someone modifies data after prom= otion, fine; she has to deal with conflicts,
if any. IMO i= t is solved adding one or two sentences in the documentation.
<= div>
>
Regarding
GUCs, almost all of them is PGC_POS= TMASTER (so it cannot be modified unless the
server is res= tarted). The ones that are not PGC_POSTMASTER, does not affect the
pg_createsubscriber execution [1].
>
=

IIUC,  primary_conninfo and primary_slot_name i= s PGC_SIGHUP.

Ditto.
=

><= br>
I'm just pointing out that this case is a different from p= g_upgrade (from which
this idea was taken). I'm not saying= that's a bad idea. I'm just arguing that
you might be pre= venting some access read only access (monitoring) when it is
perfectly fine to connect to the database and execute queries. As I s= aid
before, the current UI allows anyone to setup the stan= dby to accept only local
connections. Of course, it is an = extra step but it is possible. However, once
you apply v16= -0007, there is no option but use only local connection during the
transformation. Is it an acceptable limitation?
&= gt;

My remained concern is written above. I= f they do not problematic we may not have
to restrict them= for now. At that time, changes 

1) ov= erwriting a port number,
2) setting listen_addresses =3D '= '

It can be implemented later = if people are excited by it.

are not needed, right? IIUC inconsisten= cy of -P may be still problematic.

=
I still think we shouldn't have only the transformed primary_connin= fo as
option.

>
pglogical_create_subs= criber does nothing [2][3].
>

<= div>Oh, thanks.
Just to confirm - pglogical set shared_pre= load_libraries to '', should we follow or not?

The in-core logical replication does not require any li= brary to be loaded.


--
Euler Taveira

--71a48a97ccbc461fae7590d458dbc01c--