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 1hgAvD-0003AL-Ur for pgsql-general@arkaria.postgresql.org; Wed, 26 Jun 2019 16:37:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgAvC-0000Dx-Kv for pgsql-general@arkaria.postgresql.org; Wed, 26 Jun 2019 16:37:22 +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 1hgAvC-0000Di-1L for pgsql-general@lists.postgresql.org; Wed, 26 Jun 2019 16:37:22 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgAv4-0003Lr-I3 for pgsql-general@lists.postgresql.org; Wed, 26 Jun 2019 16:37:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id D43B721C3FB0 for ; Wed, 26 Jun 2019 19:37:11 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.31] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id A1D7021C3FAD for ; Wed, 26 Jun 2019 19:37:11 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1561567031; bh=SrwB3+k8cMT4Q7tg25cXLs6I6Bv0J4QcXSyuklaSVdk=; h=Subject:To:References:From:Date:In-Reply-To; b=iFmeVHJp1xX/zlk/bihH7yoO4+qKsZjTn/pNvfC8XWgf0vfCXbCQHxQMph5sIvbUR tDI4Mmt7fjXkFgg/wr/dEPcwNhiCYnMMPY0oyEBPZaB4LNiANpqkGlk/ZqXi+fvg0B LOEZfvyavXKdCobgl5jdb2xRXxpMgYpPodxJIIZ0= Subject: Re: Enabling checksums on a streaming replica To: pgsql-general@lists.postgresql.org References: From: Grigory Smolkin Message-ID: <92db1a5e-109e-c7b1-504b-7a897ba7d732@postgrespro.ru> Date: Wed, 26 Jun 2019 19:37:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------BE5B2EF5B4BC7F8CF46904E5" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------BE5B2EF5B4BC7F8CF46904E5 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hello! Very interesting idea, but what about full page writes, that comes from master? Can they be a problem? On 6/26/19 6:32 PM, Brad Nicholson wrote: > > I'm wondering about the validity of using the pg_checksums utility to > enable checksum's on a streaming replication standby, and then > promoting that standby as a way to enable checksums on existing clusters. > > I've tested the process out, and it "works" (by works I mean doesn't > blow up or log any errors). But this seems far enough outside of > supported territory that I'm curious what others think. > > The process is: > > - Primary with checksums off > - create a streaming replica off that primary > - stop the secondary > - enable checksums on the secondary with the pg_checksums utility > - start the replica > - promote the replica > > I've thrown load at it while the it was replicating from checksums off > -> checksums on, promoted it, and verified the checksums after with > pg_checksums. > > Any thoughts on this approach? > > Thanks, > Brad > -- Grigory Smolkin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------BE5B2EF5B4BC7F8CF46904E5 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit

Hello!

Very interesting idea, but what about full page writes, that comes from master?
Can they be a problem?

On 6/26/19 6:32 PM, Brad Nicholson wrote:

I'm wondering about the validity of using the pg_checksums utility to enable checksum's on a streaming replication standby, and then promoting that standby as a way to enable checksums on existing clusters.

I've tested the process out, and it "works" (by works I mean doesn't blow up or log any errors). But this seems far enough outside of supported territory that I'm curious what others think.

The process is:

- Primary with checksums off
- create a streaming replica off that primary
- stop the secondary
- enable checksums on the secondary with the pg_checksums utility
- start the replica
- promote the replica

I've thrown load at it while the it was replicating from checksums off -> checksums on, promoted it, and verified the checksums after with pg_checksums.

Any thoughts on this approach?


Thanks,
Brad

-- 
Grigory Smolkin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--------------BE5B2EF5B4BC7F8CF46904E5--