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 1rV17r-00ELti-Gp for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 03:19:00 +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 1rV17q-00AyKQ-7G for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 03:18:58 +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 1rV17p-00AyKH-Sg for pgsql-hackers@lists.postgresql.org; Wed, 31 Jan 2024 03:18:57 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rV17n-004dMk-Ck for pgsql-hackers@postgresql.org; Wed, 31 Jan 2024 03:18:57 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-21432e87455so2804710fac.1 for ; Tue, 30 Jan 2024 19:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706671133; x=1707275933; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2uZRWgl5EwuitDpISN51WbcN07jxlHEEHnfWiFwAcO8=; b=IDv1p+zX+Y+h3i+YloB8NJvgMB6HjZn0kSJ36do9d8DLICiotwLm9qJ9iR04pv5Xn0 Mjez5Pi99tnXAEZElTWWZs7qyyuSVYCDo4sVFcN4vfW7skyA/Q86uP1jBGXWVCBey84V edD/snBIrJ+GRJIbWVy5JASTnGL+4hUfd7h0prWCiqySQyk3ctKjH4Hgvrie4j5TSyLx Yzp/J/SPh6nOQgc8Yp84SqtQcjqNNMOjCKtYXuuOgp5Z6scmaInxvzeE541VvS/aEh+k GguGlLxJTvnlxn6sJGssEVdML5RWGm4bKJJwrApGeDJTP2JsiKt2Bbj4Y3n27CPY7ZLC TSFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706671133; x=1707275933; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2uZRWgl5EwuitDpISN51WbcN07jxlHEEHnfWiFwAcO8=; b=cNYcz2fHYWj+jQHoYU0oWvac9gvj8mg6DGlWPvm3lu7BZKf/Wg38v621aveWCAFVBH E4hEpkwpvIxen3wrAc4/YQocqUOmMsYAhGGd8HirTXsBc9e4qSVE1X99c6lzCDgl8nnS erLpkoHWpGQi0+XAZiwXHWohJ58Bxzk3mgBBdiQPB9SzGWsXKluTd13NN+Kix811yUkf Ta8x11eIl2bJDNyOR1WsQl6/Yp7SX1FTthyXkxhcmhB9pIc1YFXgM9liSAW751SvP8Gx xXq2TP/HirjSS01HMVuWllDFVrHMke7OTCsOVbn4OfL6Ff2W7+FdzsWptG/9raTOxaLi fvXQ== X-Gm-Message-State: AOJu0YzjutwN826XNYTr2iHEn9uSdkDAFtmLurH1obzIfCU3zLzdKrfu djIH4mdbD8/aGVoURlhz9FntpxO98pQZwrXznl6alvyFCQrEaiLA15qmpFh0v2SgIcYuCAE+AOo EHuZdkBsq5LPBky80oxMpnkT8UJw= X-Google-Smtp-Source: AGHT+IG2WooKqUYEvTIuKYVRznUiEKGOWzrXJ1NQfj+gExpnIOGJuUyfcxMpOcsiTwZ8g1qpHgQYp8qi5HqIaiViiRs= X-Received: by 2002:a05:6870:a68f:b0:206:79a6:24d1 with SMTP id i15-20020a056870a68f00b0020679a624d1mr593199oam.55.1706671133050; Tue, 30 Jan 2024 19:18:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 31 Jan 2024 08:48:40 +0530 Message-ID: Subject: Re: Synchronizing slots from primary to standby To: Peter Smith Cc: shveta malik , "Zhijie Hou (Fujitsu)" , Bertrand Drouvot , Ajin Cherian , Masahiko Sawada , Dilip Kumar , Nisha Moond , "Hayato Kuroda (Fujitsu)" , Bharath Rupireddy , Peter Eisentraut , Bruce Momjian , Ashutosh Sharma , Andres Freund , pgsql-hackers , Alvaro Herrera Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 31, 2024 at 7:27=E2=80=AFAM Peter Smith = wrote: > > I saw that v73-0001 was pushed, but it included some last-minute > changes that I did not get a chance to check yesterday. > > Here are some review comments for the new parts of that patch. > > =3D=3D=3D=3D=3D=3D > doc/src/sgml/ref/create_subscription.sgml > > 1. > connect (boolean) > > Specifies whether the CREATE SUBSCRIPTION command should connect > to the publisher at all. The default is true. Setting this to false > will force the values of create_slot, enabled, copy_data, and failover > to false. (You cannot combine setting connect to false with setting > create_slot, enabled, copy_data, or failover to true.) > > ~ > > I don't think the first part "Setting this to false will force the > values ... failover to false." is strictly correct. > > I think is correct to say all those *other* properties (create_slot, > enabled, copy_data) are forced to false because those otherwise have > default true values. > So, won't when connect=3Dfalse, the user has to explicitly provide such values (create_slot, enabled, etc.) as false? If so, is using 'force' strictly correct? > ~~~ > > 2. > > Since no connection is made when this option is > false, no tables are subscribed. To initiat= e > replication, you must manually create the replication slot, en= able > - the subscription, and refresh the subscription. See > + the failover if required, enable the subscription, and refresh= the > + subscription. See > linkend=3D"logical-replication-subscription-examples-deferred-slot"/> > for examples. > > > IMO "see the failover if required" is very vague. See what failover? > AFAICS, the committed docs says: "To initiate replication, you must manually create the replication slot, enable the failover if required, ...". I am not sure what you are referring to. > > =3D=3D=3D=3D=3D=3D > src/bin/pg_upgrade/t/004_subscription.pl > > 5. > -# The subscription's running status should be preserved. Old subscriptio= n > -# regress_sub1 should be enabled and old subscription regress_sub2 shoul= d be > -# disabled. > +# The subscription's running status and failover option should be preser= ved. > +# Old subscription regress_sub1 should have enabled and failover as true= while > +# old subscription regress_sub2 should have enabled and failover as fals= e. > $result =3D > $new_sub->safe_psql('postgres', > - "SELECT subname, subenabled FROM pg_subscription ORDER BY subname"); > -is( $result, qq(regress_sub1|t > -regress_sub2|f), > + "SELECT subname, subenabled, subfailover FROM pg_subscription ORDER > BY subname"); > +is( $result, qq(regress_sub1|t|t > +regress_sub2|f|f), > "check that the subscription's running status are preserved"); > > ~ > > Calling those "old subscriptions" seems misleading. Aren't these the > new/upgraded subscriptions being checked here? > Again the quoted wording is not introduced by this patch. But, I see your point and it is better if you can start a separate thread for it. --=20 With Regards, Amit Kapila.