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 1hr4eJ-00010i-QN for pgsql-docs@arkaria.postgresql.org; Fri, 26 Jul 2019 18:09:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hr4eI-0003dR-54 for pgsql-docs@arkaria.postgresql.org; Fri, 26 Jul 2019 18:08:58 +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 1hr4eH-0003dK-PL for pgsql-docs@lists.postgresql.org; Fri, 26 Jul 2019 18:08:57 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hr4eE-0000DH-O4 for pgsql-docs@lists.postgresql.org; Fri, 26 Jul 2019 18:08:57 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id D023F21C3D74 for ; Fri, 26 Jul 2019 21:08:53 +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.1.47] (unknown [176.193.7.152]) (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 71F9821C3D72 for ; Fri, 26 Jul 2019 21:08:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1564164533; bh=vOKtzgPsWR66U4NSJWOj7XJw58L35g1p78IB1jZGxws=; h=From:Subject:To:Date; b=X8wDUBG+qMUQOdL5PhuyN5lvq4Aso0s2/ZvUPRCkdUlesFRRfYzYx3bf2kX1jBERA AbacfShHBl6cJEtuFkKKJdxzHWGrVN4VhTHkn/sDvd9myuqjEK7If/xv9QcLzKz/aH r054lnUOEyhKGyvwJuYBthdA6B3nrMgUQVJ3AHIo= From: Liudmila Mantrova Subject: suspicious wording in pg_rewind docs To: pgsql-docs@lists.postgresql.org Message-ID: Date: Fri, 26 Jul 2019 21:08:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E907D42B2BC749E8254CE4EB" 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. --------------E907D42B2BC749E8254CE4EB Content-Type: multipart/alternative; boundary="------------CE2DA2A48ADD88704D730F6A" --------------CE2DA2A48ADD88704D730F6A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi everyone, While reviewing docs for [1] I came across a phrase in pg_rewind.sgml that seems confusing: "... The point of divergence can be found either on the target timeline, the source timeline, or their common ancestor. In the typical failover scenario where the target cluster was shut down soon after the divergence, this is not a problem, but if the target cluster ran for a long time after the divergence, the old WAL files might no longer be present. In that case, they can be manually copied from the WAL archive to the |pg_wal| directory, or fetched on startup by configuring primary_conninfo or restore_command . " While beginning of this paragraph talks about scanning target cluster WALs, the "or fetched on startup" part suggests that we are applying the source cluster WALs already, so I would simply remove it from here. To avoid source/target confusion, we could also add another hint that it's target WALs we are talking about. Please consider the attached fix. [1] https://www.postgresql.org/message-id/a3acff50-5a0d-9a2c-b3b2-ee36168955c1%40postgrespro.ru -- Liudmila Mantrova Technical writer at Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------CE2DA2A48ADD88704D730F6A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi everyone,

While reviewing docs for [1] I came across a phrase in pg_rewind.sgml that seems confusing:

"... The point of divergence can be found either on the target timeline, the source timeline, or their common ancestor. In the typical failover scenario where the target cluster was shut down soon after the divergence, this is not a problem, but if the target cluster ran for a long time after the divergence, the old WAL files might no longer be present. In that case, they can be manually copied from the WAL archive to the pg_wal directory, or fetched on startup by configuring primary_conninfo or restore_command. "

While beginning of this paragraph talks about scanning target cluster WALs, the "or fetched on startup" part suggests that we are applying the source cluster WALs already, so I would simply remove it from here. To avoid source/target confusion, we could also add another hint that it's target WALs we are talking about.

Please consider the attached fix.

[1] https://www.postgresql.org/message-id/a3acff50-5a0d-9a2c-b3b2-ee36168955c1%40postgrespro.ru


-- 
Liudmila Mantrova
Technical writer at Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 
--------------CE2DA2A48ADD88704D730F6A-- --------------E907D42B2BC749E8254CE4EB Content-Type: text/x-patch; name="pg-rewind-doc-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pg-rewind-doc-fix.patch" diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 52a1caa..a7e1705 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -66,14 +66,12 @@ PostgreSQL documentation can be found either on the target timeline, the source timeline, or their common ancestor. In the typical failover scenario where the target cluster was shut down soon after the divergence, this is not a problem, but if the - target cluster ran for a long time after the divergence, the old WAL + target cluster ran for a long time after the divergence, its old WAL files might no longer be present. In that case, they can be manually - copied from the WAL archive to the pg_wal directory, or - fetched on startup by configuring or - . The use of - pg_rewind is not limited to failover, e.g. a standby - server can be promoted, run some write transactions, and then rewinded - to become a standby again. + copied from the WAL archive to the pg_wal directory. + The use of pg_rewind is not limited to failover, + e.g. a standby server can be promoted, run some write transactions, and then + get rewound to become a standby again. --------------E907D42B2BC749E8254CE4EB--