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 1gw8ON-0001RO-Uc for pgsql-general@arkaria.postgresql.org; Tue, 19 Feb 2019 16:37:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gw8OL-0003Xc-Hk for pgsql-general@arkaria.postgresql.org; Tue, 19 Feb 2019 16:37:09 +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 1gw8OL-0003XV-9X for pgsql-general@lists.postgresql.org; Tue, 19 Feb 2019 16:37:09 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gw8OJ-0005hs-BB for pgsql-general@lists.postgresql.org; Tue, 19 Feb 2019 16:37:08 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6187F5F79E; Tue, 19 Feb 2019 11:37:06 -0500 (EST) Date: Tue, 19 Feb 2019 11:37:06 -0500 From: Stephen Frost To: =?iso-8859-1?Q?Mart=EDn_Fern=E1ndez?= Cc: Hellmuth Vargas , "pgsql-generallists.postgresql.org" Subject: Re: PG Upgrade with hardlinks, when to start/stop master and replicas Message-ID: <20190219163706.GV6197@tamriel.snowman.net> References: <5c6c2c3e3ec218380d000001@polymail.io> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AQDb5/OyJPRJL1y9" Content-Disposition: inline In-Reply-To: <5c6c2c3e3ec218380d000001@polymail.io> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --AQDb5/OyJPRJL1y9 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Mart=EDn Fern=E1ndez (fmartin91@gmail.com) wrote: > Thanks for information! I've refactor our migration scripts to follow the= suggestions.=A0 Please don't top-post on these mailing lists. > One extra question that popped up. As long as we don't start the standby = (after running rsync), we can always `rm -f $PGDATA_10` and promote the sta= ndby if necessary for failover right ? We also need to `mv` pg_control.old = to pg_control in the old data directory. Not sure which standby we're talking about here, but in general, yes, as long as you haven't actually started the system after the pg_upgrade/rsync, you should be able to blow away the new cluster that pg_upgrade/rsync created and start the old cluster back up and promote it (if necessary) and use it. Note that you should *not* need to do anything with pg_control, I have no idea what you're referring to there, but the old cluster should have the pg_control file and all the catalog tables in place from before the pg_upgrade/rsync (those aren't touched during the pg_upgrade/rsync process) and you would just need to start up the old binaries pointing at the old PG data directory and everything should just work. Thanks! Stephen --AQDb5/OyJPRJL1y9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcbDCxAAoJEO1sijiDR2RVE2kP/3ysdAaVHNuvUV+amspvJjst qoVHcgGMzG/95+bU1WG8/9LXDyrz6BWy4OqhKJtlzeAuMb3mhqbyStszT39AEVrt Ocl7YZNQM6DzxxL61Ba+JCMD4iCHbdaVCPLMSuVOHhl+/XbLPfm40FBIALXqQenz EiHPeqJY1V73UgvEdxnuV+3Ob+dUPK8PbFvow5RcgOnfskgdWCiJPPsh0ZvDZ062 /3ob8nTkOR6+rqxlYnINIU3cmiBESmI2OFdeYKoNRJ+Eemx05EHqVwCvESgz8ou5 2yKIBhKZ+VDfTk3I0baDNCBUOGBj2VW7Ua7v7g4BSylnL0BYabB6nR1VxOwtpBz3 kaV2fSSMCD4fi46noFlACWSu10tYUbI+71en1CiM15L/NBY5JjlAjGgYfJq3MjlD +R1jaMLLw4qjGKjm5GPyYksIIzyHV/8q1CZmwPt9hrPcwgngqb0NXsljKfd2gvPB s457x8wKHtRSpzWuJArG4HxlNO9GV6iC62npLMlRRGTkXivpKnQ2LLuKCBOlxhQv 1B/sgWFTCmHXTgEHfkTiD838m0R02nKX7IeNdkkOGuZwn//vzmT/2WWXISLDV7OX o/wW8R1x1cWx6Tz4V/cxldadACkWZYRLN4ILi6p/JtnaEbPvLE2tK0BkZMnpdeCm w5oHJTdTaNHd8MFjO7JH =Eezg -----END PGP SIGNATURE----- --AQDb5/OyJPRJL1y9--