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 1fud0S-0005JR-MN for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 12:22: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 1fud0R-0003dy-2J for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 12:21:59 +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 1fud0Q-0003dr-Ok for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 12:21:58 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fud0J-0004wH-QR for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 12:21:57 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id DB8145F79C; Tue, 28 Aug 2018 08:21:50 -0400 (EDT) Date: Tue, 28 Aug 2018 08:21:50 -0400 From: Stephen Frost To: Michael Paquier Cc: Alexander Kukushkin , Alvaro Herrera , Dmitry Dolgov <9erthalion6@gmail.com>, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15346: Replica fails to start after the crash Message-ID: <20180828122150.GC3326@tamriel.snowman.net> References: <20180822175034.lnvwk5js32k6mjyz@alvherre.pgsql> <20180823041420.GA1158@paquier.xyz> <20180828024409.GB29157@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1KZzg+WwOxUjk01t" Content-Disposition: inline In-Reply-To: <20180828024409.GB29157@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --1KZzg+WwOxUjk01t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) 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! >=20 > 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 Yeah, we really need to know how this system was built. If it was built using the low-level pg_start/stop_backup, then which API was used- the old one that creates a backup_label file, or the new API which requires the user to create the backup_label file? I haven't followed this thread very closely, but I wonder if maybe the new API was used, but no backup_label file was created, making PG think it was doing crash recovery instead of restoring from a file-level backup... Thanks! Stephen --1KZzg+WwOxUjk01t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbhT5eAAoJEO1sijiDR2RVrSgQAJwIpCKJLq0JWi/50GMZdwtA CSjGEgccJMlFun8SIG92fWwHEofZLBOHQinhLm7O8M2QPgdkRdi6zjBCSAQbMgWn Rg2rgUjSpIYhe3ZYcJ56veHXtim7PHedSoEgaK3TAyRsOKZ/HyuHReRzNbrxeCCf zqzp8rSCk06WQqoOpbK/KIzKNHzYslEFSnQakIqC7P/G/1VmcCLqQRbul63j0uRH yAvKCUZXPBB5IrrB4XZ4DHiU2KzGCFGYX0DvZnlAmkv3LXfevBZd5XqWyCfdtReP YdJFX/ivhdNUUIdV/0M1mEOCjjEG0k/we+8FLCRim6abvUsSHzjnP9EOuXjZbkwW Weq9j8hC2jbFKTBiV15CEayIR4PV9JA2cdY6Gq/bZyWSBKEk6l3QurZh2z6LEBjy LMWF7TTHHz0ypmDvzK79LRD4Z0yzQsizFSZdK3PVqhXcUtpIV68/am9r7cV1c9SY TTlDHrvBwS1VDblPBwURgOATYmXieedk5/6BO9mSMbMczKOTEB2iaVtxPfEwfA2V qeXi1Z2IPiMgkck1Nsbur7vAEAmYRZlB76qWF2Iw2SGWuwY8FaV3hLawswfzcICP /wBI9xqJw/MDaiKBLbu7ZCIRVJWawSNbskZ/dma0cmxUfZek4LgmBCnIjOHLfZuZ PlpUVBmjAqXz2CZ92jj8 =uvr+ -----END PGP SIGNATURE----- --1KZzg+WwOxUjk01t--