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 1gahbE-00045D-Ui for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Dec 2018 13:45:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gahbC-0006dd-Sr for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Dec 2018 13:45:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gahbC-0006ao-Gz for pgsql-hackers@lists.postgresql.org; Sat, 22 Dec 2018 13:45:50 +0000 Received: from mout-xforward.gmx.net ([82.165.159.41]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gahb9-0006U1-0m for pgsql-hackers@postgresql.org; Sat, 22 Dec 2018 13:45:49 +0000 Received: from nighthawk.caipicrew.dd-dns.de ([88.217.97.255]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0La3c1-1hFlMi3lfR-00lmFV; Sat, 22 Dec 2018 14:45:30 +0100 Received: from mbanck by nighthawk.caipicrew.dd-dns.de with local (Exim 4.84_2) (envelope-from ) id 1gahYN-0002vg-Km; Sat, 22 Dec 2018 14:42:55 +0100 Date: Sat, 22 Dec 2018 14:42:55 +0100 From: Michael Banck To: Michael Paquier Cc: Postgres hackers Subject: Re: Offline enabling/disabling of data checksums Message-ID: <20181222134255.GE4974@nighthawk.caipicrew.dd-dns.de> References: <20181221201616.GD4974@nighthawk.caipicrew.dd-dns.de> <20181221232834.GB1948@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181221232834.GB1948@paquier.xyz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: X-Provags-ID: V03:K1:0oCBgpSKrLWidmTBW51KYeuBrWq8y3CT9/4w1DxfPCIIBsHfOlr +iQPPgPA/l6hx1mEAfgUYlqkWHtytKCIFJiRPXTvBMO+chIFaU9nAPOuBAeUYxr9JC2xw7U LLDP7V1KqWcymtFXBmCpUKjS8p5+B0Y4fjIgd6n3XgOzE1zjczuJMsA4I0+1pgV+GLbUbN5 C5/QW70dX9t8865SmQbew== X-Spam-Flag: YES X-UI-Out-Filterresults: junk:10;V03:K0:8e2mCvaF4sg=:ZRwG6lvvd9wFJ3UZdCJDoKkI tvIMnkf9oGj46Im/D27xAyg1O+l4EpFfeGdassGc6feIfMCRZMrVyU9l7xDdPC1eCM1mg7B3c Dv1Hb5U0ZVm0g4PQQb1JrhC9Utc6ftlU5j17F4RFZlUNw7aZapFKGVaP1v+kSvzdwonZpKxhg bu3gMpDcJOGM94D+vXiVRoU9FgXb6ow3uIDH+pentoHvxhHiPQLaiMWbKY/23JZgd5qF3F1R8 /x6xLXH3ehsitjzscBu6PgkRR9FNK3Sc0dsTghPa2/ShLxVsVvqUBvTx3TgdVciRgrxDkKfx8 9J+3KcC5ff5fNRyFnQePE4jw10ZOJuWnzLE1pcixTYrngG+iJ6MI6THdAfUorZXdE1gACx+KU nwZX83CRU0zkxvpiqKkIOYEJ5GA+GuETaOf2uue1vA3zJ7ITyHr1EEkCgLuHz2Lj6++RYRESM ZRDhhJVo428V47BAbE83EAhzs5Xr48IlLUV4QuQuYRConGAKJGZU/qzyfWbqhZYaSmF0XWAMo CNx4Vbk1IlZeIY7yh0WJH8YP6+aRi88rPUFbYaRjBkecUyUHnQCEUOnIus/iYzYREHUTpLDyO CPykfUXwm65cQjHc4MHSeHHJJcPjlBlmofTitT32a8XfNIi6UKfsRcg6eeVNRiFBlDnTvS6Ps RNXuTQh4JeYvtd2wnOB/JLovz7ReLdcCfG8pocqqyHTGAqExb4cYR35/I0EfJBI7Z58IC1Okp m3d+zFD1v+VWYkkGI+YC+H7WfT21bffPXtwMBfP2O/rTWskPIlQm+/3ozvJtHNzgb51BeNWDQ VcbODuv0y5HAGsYo3/7JKPElg7QDy/vxChoSTSKE58ZE97oi6Lkfl2AxTg9v6evGfx/DHSxzE HnZLyqxeK7CzKdq9ik1QBcH++72vcB4qYQh6QjTSg//P9I7/+In25A+vy61h/zOBvSxBQ4pLp msSyFa3GRQmoygWWV7h0ely2o1iYCR/7HH1FBHALK/TevqkgMHOyf46NiqdDssBlRvQ4XHeau 2c0MziLuLXe3y8A/Akny4= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I have added it to the commitfest now: https://commitfest.postgresql.org/21/1944/ On Sat, Dec 22, 2018 at 08:28:34AM +0900, Michael Paquier wrote: > On Fri, Dec 21, 2018 at 09:16:16PM +0100, Michael Banck wrote: > > It adds an (now mandatory) --action parameter that takes either verify, > > enable or disable as argument. > > There are two discussion points which deserve attention here: > 1) Do we want to rename pg_verify_checksums to something else, like > pg_checksums. I like a lot if we would do a simple renaming of the > tool, which should be the first step taken. I am for it, but don't mind whether it's before or afterwards, your call. > 2) Which kind of interface do we want to use? When I did my own > flavor of pg_checksums, I used an --action switch able to use the > following values: > - enable > - disable > - verify > The switch cannot be specified twice (perhaps we could enforce the > last value as other binaries do in the tree, not sure if that's > adapted here). A second type of interface is to use one switch per > action. For both interfaces if no action is specify then the tool > fails. Vote is open. Even though my fork has the separate switches, I like the --action one. On the other hand, it is a bit more typing as you always have to spell out the action (is there precendent of accepting also incomplete option arguments like 'v', 'e', 'd'?). > > This is basically meant as a stop-gap measure in case online activation > > of checksums won't make it for v12, but maybe it is independently > > useful? > > I think that this is independently useful, I got this stuff part of an > upgrade workflow where the user is ready to accept some extra one-time > offline time so as checksums are enabled. OK; we have also used that at clients - if the instance has a size of less than a few dozen GBs, enabling checksums during a routine minor upgrade restart is not delaying things much. > > 2. Rename the scan_* functions (Michael renamed them to operate_file and > > operate_directory but I am not sure it is worth it. > > The renaming makes sense, as scan implies only reading while enabling > checksums causes a write. Ok, will do in the next version. Michael -- Michael Banck Projektleiter / Senior Berater Tel.: +49 2166 9901-171 Fax: +49 2166 9901-100 Email: michael.banck@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer Unser Umgang mit personenbezogenen Daten unterliegt folgenden Bestimmungen: https://www.credativ.de/datenschutz