Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uWLf7-00CZdE-IA for pgsql-general@arkaria.postgresql.org; Mon, 30 Jun 2025 21:03:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uWLf5-002Mlq-NV for pgsql-general@arkaria.postgresql.org; Mon, 30 Jun 2025 21:03:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uWLf5-002Mlf-CU for pgsql-general@lists.postgresql.org; Mon, 30 Jun 2025 21:03:36 +0000 Received: from smtp.burggraben.net ([88.198.69.140]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uWLf4-004pWo-0B for pgsql-general@lists.postgresql.org; Mon, 30 Jun 2025 21:03:35 +0000 Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7120:1:21b:21ff:fef0:248b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "elch.exwg.net", Issuer "R10" (verified OK)) by smtp.burggraben.net (Postfix) with ESMTPS id A8D1AC0030F; Mon, 30 Jun 2025 23:03:31 +0200 (CEST) Received: by elch.exwg.net (Postfix, from userid 1000) id 81116FE57C; Mon, 30 Jun 2025 23:03:31 +0200 (CEST) Date: Mon, 30 Jun 2025 23:03:31 +0200 From: Christoph Moench-Tegeder To: Franklin Anderson de Oliveira Souza Cc: pgsql-general@lists.postgresql.org Subject: Re: Simulate a PITR in postgresql 16 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.14 (2025-02-20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ## Franklin Anderson de Oliveira Souza (franklinbr@gmail.com): > LOG: database system was shut down at 2025-06-30 12:15:28 -04 > cp: cannot stat '/dados/temp/wals/00000002.history': No such file or directory > ----------------- > > > The restore_command requires the .history file but it does not exist > in any of the clusters in this simple test, which is wrong in this > example ? Tanks Everything is fine - as long as the next log line starts with "starting backup recovery". Your cluster starts on timeline 1, and the (default) recovery_target_timeline is "latest", so the recovery process needs to check if other timelines exist and what the latest timeline is. It's just that the stderr from cp ends up in your log. See https://www.postgresql.org/docs/17/continuous-archiving.html#BACKUP-TIMELINES for details on timelines. Regards, Christoph -- Spare Space