Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1et6yB-0003rl-Qy for pgsql-general@arkaria.postgresql.org; Tue, 06 Mar 2018 07:25:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1et6yA-00007l-KQ for pgsql-general@arkaria.postgresql.org; Tue, 06 Mar 2018 07:25:06 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1et6y9-00006j-QD for pgsql-general@lists.postgresql.org; Tue, 06 Mar 2018 07:25:06 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1et6y2-0000ZE-Gk for pgsql-general@lists.postgresql.org; Tue, 06 Mar 2018 07:25:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 3566EF41; Tue, 6 Mar 2018 02:24:56 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 06 Mar 2018 02:24:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=OjkuMhWxFp0zrZx8YowWS4xPHnzlGKEK7IwpV5ZmUlg=; b=phTCoWpX jPMg/qcz2FK1G8ZCQDdoVgmMMQ/T6gFkhsh84U3HrhA/eaaygpSvxcCjWEJ1trlU FXD5XIf6mAUNB03FJgi5nLSNOjYZgy1cmef18qj/2XXQU9m0bL67cAUTQr8stnB9 EL8udZdia4e/aPxoLSG7YQAJYdGZtoqZNJvwZONE5FDMZRbqBpQCfGQa2Pz4YeGM /ZPVhkLmQGdZKdDySLyuH7yV7S1Wzrnx+vXOUjHIGHyLMm0MTS/Neit7fB+mJ+FX ipmCdJ1VILl7HTKGckSdoe0fonbqW32JRFgpllnXpcuPKy3n/WyyUnH1Z/jhrNkY 0C641/VaEaSOgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=OjkuMhWxFp0zrZx8YowWS4xPHnzlG KEK7IwpV5ZmUlg=; b=QQopLDYozyv8Gdo3pQuxD6GUcRLR+XVDlRg1g1cUG58B7 N0s5qirvsXTCS/yKnudefBlYb6YskfS2+UbPJhPAXaGVgZ/HbYHTtsDIF13JFaNy tZoq7LMSuMBv7605IT/6oKkF0IqUJiDTHK/SJXUoBy+L+nYqHXBZV7zhI/uAhywe 8ltw/BUhXfemVEic0YEamSf9flXqS+NP//ml3n8JpOZXdYZFy6f8tTJCE1DknHwb Q1m9D3jQCYjh5rW3dtNxK0gEvbkAXpp99gLSmeZ6pgGWV28GXIyzbopFANhE4HJr qZhOv23zV4HsnxSItnv0cx5kDfil2eWKiCCMspmHw== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 8AAD824404; Tue, 6 Mar 2018 02:24:54 -0500 (EST) Date: Tue, 6 Mar 2018 16:24:46 +0900 From: Michael Paquier To: Dylan Luong Cc: "pgsql-generallists.postgresql.org" Subject: Re: Resync second slave to new master Message-ID: <20180306072446.GA587@paquier.xyz> References: <4acf4492b18c4c4ca42bebc8570c84a5@ITUPW-EXMBOX3B.UniNet.unisa.edu.au> <20180306052341.GA4717@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ADZbWkCsHQ7r3kzd" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 06, 2018 at 06:00:40AM +0000, Dylan Luong wrote: > So everytime after promoting Slave to become master (either manually > or automatic), just stop Slave2 and run pg_rewind on slave2 against > the new maser (old slave1). And when old master server is available > again, use pg_rewind on that serve as well against new master to > return to original configuration. Yes. That's exactly the idea. Running pg_rewind on the old master will be necessary anyway because you need to stop it cleanly once, which will cause it to generate WAL records at least for the shutdown checkpoint, while doing it on slave 2 may be optional, still safer to do. -- Michael --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlqeQj4ACgkQnvQgOdby QH1+jg//VPvAadBOy0K3RwNDkqMPA3wEBqJYO1EAokCMw0nIIQMBsacSv3tQzDzl UjJSBFNw8UJRzYCnLFSQqyVlcRrIfnudINeJugvQokY3Y6mPcTh/g8BNZRG4m8A0 uOz5Hbxnh5mVizUOTBKiqbY9aHk1DAb1NqLFYLOJ0+b96a/q3rg9q2LQJZE7He83 DQDHd0WDOV9cSrzDF2uKU46jqpOT0LgVlmXAXUchtii00Zb1TaexN2plCfItyKFk 6sCKd6RU+Z3tZHy+SktA7hdA5ULuTMetAoHqjiKXc2AgFrMLi8jqO9qDl848LrRT ctQuIWV071N2x37vWCJSsw3ogCv5X0PqvVxAIBxcJR+IB67uxFSdPuHR9kS1MSOJ 7nNERedsm+zucjHPoogG5JOwPw4P8b+HlcIKmn4TClnYIe0dra71aGy6QaIvf7jg mOuswK4sxnE6iiVTe+kJtf6AuNbnTDIea0giQ90uATajpR6W1gcRw2OPf9L4keS4 j4TtNJoStayQw66PbgM9U7RdUUedwtK+5xr9jPhg4AG89QYR8mvXwSvF7vGROyyh l0bfQ4Oflp9w363nxRMs6wYWDbAiZ9Y0rLaxaVVZyVtJuuc0FSFmjVbZKaz5271A H1SJvO2v0Ja5eOfTIdhcAZLY5aRDhoGF18K0P4fasej7blSs4QU= =VIif -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd--