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 1hbnR8-0005xl-NX for pgsql-performance@arkaria.postgresql.org; Fri, 14 Jun 2019 14:44:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hbnR7-0005f0-Al for pgsql-performance@arkaria.postgresql.org; Fri, 14 Jun 2019 14:44:13 +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 1hbnR6-0005Z4-V3 for pgsql-performance@lists.postgresql.org; Fri, 14 Jun 2019 14:44:12 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbnR4-000231-At for pgsql-performance@lists.postgresql.org; Fri, 14 Jun 2019 14:44:12 +0000 Received: from bruce by momjian.us with local (Exim 4.89) (envelope-from ) id 1hbnR3-0001vp-1g; Fri, 14 Jun 2019 10:44:09 -0400 Date: Fri, 14 Jun 2019 10:44:09 -0400 From: Bruce Momjian To: Fabio Pardi Cc: pgsql-performance@lists.postgresql.org Subject: Re: Fwd: upgrade to PG11 on secondary fails (no initdb was launched) Message-ID: <20190614144409.bmrlzgnu4ibhz2cr@momjian.us> References: <68cf5e6c-8eb0-d8dc-08ec-78d8e910c17c@portavita.eu> <20190614033001.5jif725fxchtopg7@momjian.us> <20190614143940.vux2quolie4s6luv@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190614143940.vux2quolie4s6luv@momjian.us> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jun 14, 2019 at 10:39:40AM -0400, Bruce Momjian wrote: > On Fri, Jun 14, 2019 at 03:12:29PM +0200, Fabio Pardi wrote: > > Using --size-only, tells rsync to only check the size of the blocks. > > That is: if the block is present on the destination, and is the same > > size as the origin, then skip. > > The files are _exactly_ the same on primary and standby, so we don't > need to check anything. Frankly, it is really only doing hard linking > of the files. Here is the description from our docs: What this does is to record the links created by pg_upgrade's link mode that connect files in the old and new clusters on the primary server. It then finds matching files in the standby's old cluster and creates links for them in the standby's new cluster. Files that were not linked on the primary are copied from the primary to the standby. (They are usually small.) This provides rapid standby upgrades. Unfortunately, rsync needlessly copies files associated with temporary and unlogged tables because these files don't normally exist on standby servers. The primary and standby have to be binary the same or WAL replay would not work on the standby. (Yes, I sometimes forgot how this worked so I wrote it down in the docs.) :-) -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +