From Dylan.Luong@unisa.edu.au Thu May 21 23:42:18 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHg3x-0006Sh-Mv for pgsql-general@arkaria.postgresql.org; Mon, 05 Jun 2017 00:40:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHg3v-00020e-IM for pgsql-general@arkaria.postgresql.org; Mon, 05 Jun 2017 00:40:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHg1X-0006Bp-RT for pgsql-general@postgresql.org; Mon, 05 Jun 2017 00:37:35 +0000 Received: from itupa-meg1c.cw.unisa.edu.au ([130.220.96.210]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHg1R-0006bP-Mg for pgsql-general@postgresql.org; Mon, 05 Jun 2017 00:37:33 +0000 Received: from ITUPW-EXMBOX2C.UniNet.unisa.edu.au (unknown [10.78.2.22]) by itupa-meg1c.cw.unisa.edu.au with smtp (TLS: TLSv1/SSLv3,128bits,AES128-SHA256) id 5feb_1863_d90680d2_f51e_44a1_abd8_ffc16e40f37d; Mon, 05 Jun 2017 10:07:17 +0930 Received: from ITUPW-EXMBOX2B.UniNet.unisa.edu.au (10.78.2.21) by ITUPW-EXMBOX2C.UniNet.unisa.edu.au (10.78.2.22) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 5 Jun 2017 10:07:16 +0930 Received: from ITUPW-EXMBOX2B.UniNet.unisa.edu.au ([169.254.2.248]) by ITUPW-EXMBOX2B.UniNet.unisa.edu.au ([169.254.2.248]) with mapi id 15.00.1263.000; Mon, 5 Jun 2017 10:07:16 +0930 From: Dylan Luong To: "pgsql-general@postgresql.org" Subject: pg_rewind - enable wal_log_hints or data-checksums Thread-Topic: pg_rewind - enable wal_log_hints or data-checksums Thread-Index: AdLdknoO8rHCAl3uRJCweFk9EZP8jg== Date: Mon, 5 Jun 2017 00:37:15 +0000 Message-ID: Accept-Language: en-AU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [130.220.0.2] Content-Type: multipart/alternative; boundary="_000_f9be7f2023784cbbb58255b0d9ea8281ITUPWEXMBOX2BUniNetunis_" MIME-Version: 1.0 X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 10 X-NAI-Spam-Score: 0.4 X-NAI-Spam-Rules: 5 Rules triggered DTP_2WD=0.1, GME_TWTRE=0.1, THREAD_INDX_INVALD_VAL=0.1, TRK_NCM1=0.1, RV6039=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6039> : inlines <5905> : streams <1748534> : uri <2438295> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org --_000_f9be7f2023784cbbb58255b0d9ea8281ITUPWEXMBOX2BUniNetunis_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi In the PostgreSQL documentation for pg_rewind: pg_rewind requires that the target server either has the wal_log_hints opti= on enabled in postgresql.conf or data checksums enabled when the cluster wa= s initialized with initdb. What is the difference between the two options? What are the advantages and disadvantages between the two? Which one is the the preferred option? Thanks Regards Dylan --_000_f9be7f2023784cbbb58255b0d9ea8281ITUPWEXMBOX2BUniNetunis_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

 

In the PostgreSQL documentation for pg_rewind:<= /o:p>

 

pg_rewind requires that the target server either = has the wal_log_hints option enabled in postgresql.conf or data checksums e= nabled when the cluster was initialized with initdb.

 

 

What is the difference between the two options?=

What are the advantages and disadvantages between th= e two?

Which one is the the preferred option?

 

Thanks

Regards

Dylan

 

--_000_f9be7f2023784cbbb58255b0d9ea8281ITUPWEXMBOX2BUniNetunis_-- From michael.paquier@gmail.com Thu May 21 23:42:18 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHh0Z-00055d-PL for pgsql-general@arkaria.postgresql.org; Mon, 05 Jun 2017 01:40:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHh0Y-0002Fq-82 for pgsql-general@arkaria.postgresql.org; Mon, 05 Jun 2017 01:40:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHgy8-0006IE-IV for pgsql-general@postgresql.org; Mon, 05 Jun 2017 01:38:08 +0000 Received: from mail-yw0-x22f.google.com ([2607:f8b0:4002:c05::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dHgy5-0007ii-NN for pgsql-general@postgresql.org; Mon, 05 Jun 2017 01:38:07 +0000 Received: by mail-yw0-x22f.google.com with SMTP id l75so10595313ywc.3 for ; Sun, 04 Jun 2017 18:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0ZjqTVU3NizzTCWPQOh/gTBDs8r5t8yvxSz83IQBFfM=; b=vNiXyfEg5VQtqY6hANbcglqKrbzk/ODObcglSPvEXv0Soh7KWkb+F3CdNclkePV1CW RgsvgRZ37gk9I2F0ZS4zkiz6iid1MIJahBxi01HEs7t/PghPA8zUrzHzUEw02itd0meO GNXKy0xitoZcELeiNhbt88+oprwszx3wPhV4Wls1qG4GcGt1Jnlptm7WaMj7qB3kEr9b fMhcH1c9GierHrfSs0KUrbOzrsGl7sRdSJdQBwLeB1udp0k2uBK7zXcbkojT34Aii6SW 9n+CgAkQ2+Z7BEJ1NhUMJbmMOquRXtk6rEoNykUVAJ6heOZGxMZy5aukNkPNQDoxzPRP F9wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0ZjqTVU3NizzTCWPQOh/gTBDs8r5t8yvxSz83IQBFfM=; b=CCKo38bd656pX/UinvRq3ul9lpdB58PbewTmjG8ELdzVYqxIhYkFICrGhjWlaVTXPn 5qfr/gsHz7JKcJD355pLeCnIU3SAQFBUcxyJtHDLWlO2mOcfs5JmVBlrf2HHw66RJdO2 kKrd4ogc7I1Ra6Gpb8u7hlVMldN12wAHZl0z/C2CG/3wxC9nB/BD8FpTgSG1McByfab6 OlyUg+HmxfDsp+gkGS9W3fi3ld94VA3oG6a8IUOEbbVQzsb2IhE4BasSlIkbez/TpMBW N6Mjd+WBkm2JlqTVJT1SrCeFUCkEvvveQ5q0c1U7LdNUeXLmM/BjUs349M1RGXNDWsUU qcAQ== X-Gm-Message-State: AODbwcAArSjqAMCXT6yF+KBXzJaj0Hv+jkPHYlWAXbluuRHIu6VXmOXp dOO3rdhecEEfyv68CxSUsOhQhlFtdQ== X-Received: by 10.13.255.135 with SMTP id p129mr13587551ywf.261.1496626684882; Sun, 04 Jun 2017 18:38:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.198.77 with HTTP; Sun, 4 Jun 2017 18:38:04 -0700 (PDT) In-Reply-To: References: From: Michael Paquier Date: Mon, 5 Jun 2017 10:38:04 +0900 Message-ID: Subject: Re: pg_rewind - enable wal_log_hints or data-checksums To: Dylan Luong Cc: "pgsql-general@postgresql.org" Content-Type: text/plain; charset="UTF-8" X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On Mon, Jun 5, 2017 at 9:37 AM, Dylan Luong wrote: > pg_rewind requires that the target server either has the wal_log_hints > option enabled in postgresql.conf or data checksums enabled when the cluster > was initialized with initdb. Yes, this is to make sure that you don't finish with a corrupted target server if a hint bit is set on a page after a checkpoint. Any of those options make sure that a full-page write is generated in this case. > What is the difference between the two options? Data checksums calculate 2 bytes of checksum data and write it to each page that is evicted from shared buffers. Each page read from disk has its checksum checked. In some workloads, like a heavy read load where a lot of page evictions happen, this can induce a couple of percents of performance lost. In my own experience, that's 1~2%. > What are the advantages and disadvantages between the two? > Which one is the the preferred option? If you care more about performance or if you use a file system that has its own block-level checksum, wal_log_hints would be preferred. Data checksums offer more guarantees in terms of integrity though when looking for corrupted data. Things get found more quickly. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general