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 1ggsXY-0000pK-3x for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Jan 2019 14:39:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ggsXW-00051M-Gr for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Jan 2019 14:39:34 +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 1ggsXW-00051F-9o for pgsql-hackers@lists.postgresql.org; Tue, 08 Jan 2019 14:39:34 +0000 Received: from dd6214.kasserver.com ([85.13.131.7]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ggsXU-00085U-8g for pgsql-hackers@postgresql.org; Tue, 08 Jan 2019 14:39:33 +0000 Received: from niheb.land.credativ.lan (fw-front.credativ.com [62.154.226.94]) by dd6214.kasserver.com (Postfix) with ESMTPSA id A44F21BC08DA; Tue, 8 Jan 2019 15:39:30 +0100 (CET) Message-ID: <65e4f3684f7563acc8b309393b8e14388b5eae0d.camel@oopsware.de> Subject: Re: Offline enabling/disabling of data checksums From: Bernd Helmle To: Fabien COELHO , Michael Banck Cc: Magnus Hagander , Michael Paquier , Postgres hackers Date: Tue, 08 Jan 2019 15:39:30 +0100 In-Reply-To: References: <20181221201616.GD4974@nighthawk.caipicrew.dd-dns.de> <20181227011534.GD2106@paquier.xyz> <1546945543.32387.8.camel@credativ.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3 (3.30.3-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am Dienstag, den 08.01.2019, 15:09 +0100 schrieb Fabien COELHO: > > The question is how to reliably do this in an acceptable way? Just > > faking a postmaster.pid sounds pretty hackish to me, do you have > > any > > suggestions here? > > Adding a new state to ControlFileData which would prevent it from > starting? But then you have to make sure the control flag gets cleared in any case pg_verify_checksums crashes somehow or gets SIGKILL'ed ... Setting the checksum flag is done after having finished all blocks, so there is no problem. But we need to set this new flag before and reset it afterwards, so in between strange things can happen (as the various calls to exit() within error handling illustrates). Bernd.