Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fud1g-0005L6-Go for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 12:23:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fud1e-0004Vy-Ox for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 12:23:14 +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.89) (envelope-from ) id 1fud1e-0004Vq-Eq for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 12:23:14 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fud1b-0004wv-UI for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 12:23:13 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A9EAF5F79C; Tue, 28 Aug 2018 08:23:11 -0400 (EDT) Date: Tue, 28 Aug 2018 08:23:11 -0400 From: Stephen Frost To: Andres Freund Cc: pgsql-bugs@lists.postgresql.org, Michael Paquier , Alexander Kukushkin , Alvaro Herrera , Dmitry Dolgov <9erthalion6@gmail.com> Subject: Re: BUG #15346: Replica fails to start after the crash Message-ID: <20180828122311.GD3326@tamriel.snowman.net> References: <20180822175034.lnvwk5js32k6mjyz@alvherre.pgsql> <20180823041420.GA1158@paquier.xyz> <20180828024409.GB29157@paquier.xyz> <3B69F535-FD81-461B-97E9-657D4C99EDB4@anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cJBXKg+qK+ndJ6Np" Content-Disposition: inline In-Reply-To: <3B69F535-FD81-461B-97E9-657D4C99EDB4@anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --cJBXKg+qK+ndJ6Np Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Andres Freund (andres@anarazel.de) wrote: > On August 28, 2018 11:44:09 AM GMT+09:00, Michael Paquier wrote: > >On Sat, Aug 25, 2018 at 09:54:39AM +0200, Alexander Kukushkin wrote: > >> Why the number of tuples in the xlog is greater than the number of > >> tuples on the index page? > >> Because this page was already overwritten and its LSN is HIGHER than > >> the current LSN! > > > >That's annoying. Because that means that the control file of your > >server maps to a consistent point which is older than some of the > >relation pages. How was the base backup of this node created? Please > >remember that when taking a base backup from a standby, you should > >backup the control file last, as there is no control of end backup with > >records available. So it seems to me that the origin of your problem > >comes from an incorrect base backup expectation?=20 >=20 > Uh, where is that "control file last" bit coming from? pg_basebackup copies it last. The comments should probably be improved as to *why* but my recollection is that it's, at least in part, to ensure the new cluster can't be used until it's actually a complete backup. Thanks! Stephen --cJBXKg+qK+ndJ6Np Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbhT6vAAoJEO1sijiDR2RV/joP/je8EWe5L2Xl02sk/I8LCwMu BXQ73rtPZ5TWdvlmGPXGo6p1Or3KeTa86ic17XHKxGwlJZMfWlrT5iMChzRH2KN6 JHEbKGO0Q2YQ1xdmfZBy8+GN2xnYVnFYvo3+AzYcSgjmirj8haldZek7dAwYWGKI m6PICKkfvMWZx4L/UUpSgnlzcxkzBuaYmDQj7Vqpsd/Wh6OB0rbgtKlxdHIgY+zi +Qx65mEJKm1ThS21c3rUGJUr3r0Phv3vAYOcd2HJhunJfEZDsPyBNiRQqvioOuQZ GzHsXuYj8RWrDCWBRehL0kyeslb/6xa4CV3GF6pLAtIZYz0ahdhDRIlUtystRogg 7aAfTqDrZbC4Q07xVfe1p7t9zBUeH62TuMUlN1i82sedXias3qXj8pZseIYFloRM pCjLnamW4A/EGBx8nYYwr0dsS+kLMubi0vthag+79Inw49MiNM6JZvqR8/3DOVbp UGkCrlLw1vjEinHiREbhjG3raGKfvlzjTuv17+59VVN5XjSx3e4HGZM8b8vkuk2/ ZumUr0I+Hd8H6iXF7eL4RXoeQQYzye8MF1SQ3WuT4AdsLeaiB0fr8cCL+eEEA5Ub o1pB7K4p5z6tPMh918GVTbCXkrBYSjodJnrqolLDB6rcdFbOq7CHS1A0seN2hIR/ BTQYLVKM6Pja5l5juFJl =NUPn -----END PGP SIGNATURE----- --cJBXKg+qK+ndJ6Np--