Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdabT-0007hV-1U for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 15:03:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kdabR-0004eG-VA for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 15:03:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdabR-0004e9-Ng for pgsql-general@lists.postgresql.org; Fri, 13 Nov 2020 15:03:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdabP-0005D8-MM for pgsql-general@lists.postgresql.org; Fri, 13 Nov 2020 15:03:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0ADF2vjU285452; Fri, 13 Nov 2020 10:02:57 -0500 From: Tom Lane To: Dennis Jacobfeuerborn cc: pgsql-general@lists.postgresql.org Subject: Re: "invalid record length" after restoring pg_basebackup In-reply-to: References: Comments: In-reply-to Dennis Jacobfeuerborn message dated "Fri, 13 Nov 2020 13:52:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <285450.1605279777.1@sss.pgh.pa.us> Date: Fri, 13 Nov 2020 10:02:57 -0500 Message-ID: <285451.1605279777@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dennis Jacobfeuerborn writes: > All of this works fine and the logs report that the db reaches a > consistent recovery state but as last entry it reports an "invalid > record length": This looks quite normal to me. If you'd pulled the power plug on the primary system at the time you made this backup, you would likely see the same message at the end of its crash recovery. Some sort of corrupt-WAL-entry report is expected at the end of WAL replay anytime you didn't have a clean shutdown. regards, tom lane