Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6akU-0001yB-EW for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 12:55:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6akT-0007mR-2s for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 12:55:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6akR-0007mK-PA for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2019 12:55:12 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6akN-0007hE-Ec for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2019 12:55:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 19DF1221F7; Wed, 20 Mar 2019 08:55:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 20 Mar 2019 08:55:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=POaN0BzyAsmxzam7j7+T/aYtZ3p VMNzALZzkhZb91fQ=; b=lgCZLb1cxPSehBuRPWjULNc/VsvXzujiqDacrMo+n2r W3S7FbVDCHIYisD9qXo/gLwzRT2pEqIHa12THmHQiZY3dKOXWW2GXiZYyojBrQG/ ANthpgHkzMlD+AM5sdbA3jdzudR1ca22a8nF+nmmTvwiRaswyAHyUCSjaQxSslO/ BXYrd4eTu8bxX0Mo6X3KJKb/tt+jGIPcORrEzZpQZAJPYsIiHJP2knhGorEthIUz rpYZWJreI/CXNLaK915bOOVGB4y2kx8np4p82EeC9tqFcAV05YviuITkgLOLFOga rC3PPTT64Ls8yqtDZQKq2wp49zmBzKRP0Oh67iAJodA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=POaN0B zyAsmxzam7j7+T/aYtZ3pVMNzALZzkhZb91fQ=; b=VpZa5kcrSZZfteLTho7d93 ysnrTlRePjLROyXpm0YyxJPVQh7RXoFj9FMBapbpfWzt2Teedz8xy0ZJoa5qyml1 jsJWb8GQB3OlYYaZU7wkpF8e7de+bqmrWDIwwEvEARxbCMhgPIhTfwBa1kEuCo65 ZhUD0mdyrQZpktYKfhVZqzrAUWp+oft+HceFh1RTGjinU61yIEoPLD0k6S0LhUpP mwJrKplP8pBqsOVoqBaggp+bf9qOEnbEX1TEdVQMTZAib2Z+w6RRsIE6J1tPNaIB C67EhNXPs3AFyGwKu6Bc5lKxbVPA3+YqACkIQ+/DaCm50stcqFCBGNznYxuD5Oyg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieeigdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdej necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghm pehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 54CF510316; Wed, 20 Mar 2019 08:55:00 -0400 (EDT) Date: Wed, 20 Mar 2019 21:54:51 +0900 From: Michael Paquier To: Fabien COELHO Cc: Andres Freund , Michael Banck , Magnus Hagander , Sergei Kornilov , PostgreSQL Developers Subject: Re: Offline enabling/disabling of data checksums Message-ID: <20190320125451.GA20192@paquier.xyz> References: <20190319153626.vgxcem5r65yhydck@alap3.anarazel.de> <1553010912.9697.53.camel@credativ.de> <20190319160037.baalicue7ovkhvb2@alap3.anarazel.de> <1553011697.9697.55.camel@credativ.de> <20190319161317.utyo6pnkxznxu4bu@alap3.anarazel.de> <1553013016.9697.57.camel@credativ.de> <20190319164717.ex2pw66zusbdqg2o@alap3.anarazel.de> <20190319230907.GA3488@paquier.xyz> <20190320051750.GA26601@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --AqsLC8rIMeq19msA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2019 at 10:38:36AM +0100, Fabien COELHO wrote: > Hmmm=E2=80=A6 so nothing:-) The core of the feature is still here, fortunately. > I think that a clear warning not to run any cluster command in parallel, > under pain of possible cluster corruption, and possibly other caveats abo= ut > replication, should appear in the documentation. I still have the following extra documentation in my notes: + + Notes + + When disabling or enabling checksums in a cluster of multiple instances, + it is recommended to stop all the instances of the cluster before doing + the switch to all the instances consistently. When using a cluster with + tools which perform direct copies of relation file blocks (for example + ), enabling or disabling checksums can + lead to page corruptions in the shape of incorrect checksums if the + operation is not done consistently across all nodes. Destroying all + the standbys in a cluster first, enabling or disabling checksums on + the primary and finally recreate the cluster nodes from scratch is + also safe. + + This sounds kind of enough for me but.. > I also think that some mechanism should be used to prevent such occurence, > whether in this patch or another. I won't counter-argue on that. > I still think that the control file update should be made *after* the data > directory has been synced, otherwise the control file could be updated wh= ile > some data files are not. It just means exchanging two lines. The parent path of the control file needs also to be flushed to make the change durable, just doing things the same way pg_rewind keeps the code simple in my opinion. > If the conditional sync is moved before the file update, the file update > should pass do_sync to update_controlfile. For the durability of the operation, the current order is intentional. -- Michael --AqsLC8rIMeq19msA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlySOBsACgkQnvQgOdby QH0NpxAAiseqrv1Vff1ONDM6G54eZWpO/9rba5D1vaCddDsUqUL8QoL3VpGv/pcl Mz8JeTiuxjf7tam1fiJw784x6Z3dGLOISXe9oxHxZpKJJpGpawGwgZRze3+GCYjj 2S3bPqon2INo8+OrNDMzUc2fqoW9mlkOt5AjL6YoUW5GBXyRUqeH6hVtl1GMSxOz XlN8ubzfgcWyOviUX9OAB+qfbbELzcp4UnUkPv/KxWsty3PiYs2fPFmzGchUV4Dm fUw85hF2DT4znHgWm2hQqSHql0ZdxtzVjykp9yue2Gns6Qo8Tvfgk+G1K+OmzuW7 z2/qoryw+12CMVJelnhrAFYti/NeeJ/rORzlfWcn7AIPKUpX7XGvNIb+ddFkFE44 cagPX1pO90kYb1GdOSCBuHA5PAt8ZYRPBRCjnOmZlZy/p78qYuMBgvtNITvHQlNI RXmS4otBfXpXXtnEFbox/wZeoTK24N9DNXW1FYSchfGqLShPy48wrJzTKSdhGunO TLikcN+W6Dgmg7nvP39ctmC3RAHKWE1RUf4O4uDDM3uE0m8Bu/kB3scLHoM80CM2 8TzzKf8G+rQ0tYFnEPHR0ydth6gG48l/q6wsWMDnUl3/3/DwloI+NuZxLVGrricz fWlAkwu8LIPRN5unu8RVzK+Vw0DA1B0FwjSArqI8HlR9ShtpTXA= =60EU -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--