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 1qU7mn-00Bjxn-MW for pgsql-admin@arkaria.postgresql.org; Thu, 10 Aug 2023 15:41:18 +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 1qU7mm-00GPjl-4o for pgsql-admin@arkaria.postgresql.org; Thu, 10 Aug 2023 15:41:16 +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 1qU7ml-00GPjd-FL for pgsql-admin@lists.postgresql.org; Thu, 10 Aug 2023 15:41:16 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qU7mi-001dlX-Qz for pgsql-admin@lists.postgresql.org; Thu, 10 Aug 2023 15:41:14 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id E53305F7B7; Thu, 10 Aug 2023 11:41:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowman.net; s=dkim; t=1691682066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vUADMBPKMB3z4fZUeiFMk1x9kFe9/gaNVgsKeXlzO5k=; b=jYa8R5Y/Ncf2syveJ9fq7HORJYNFI97rYY/GkQoksprx+baPbKbnExpS+Y2iSKJc7nxJ0V JcUDFN5E+n7YcN1hjy//Npyo7RKVeRA3jY1ACyJP4CPVMKOsq1zBj+vodiLghFmxWUDgUn Xu8ZYxPpfTJFsPdkeZUowBJZlr3X7ek= Date: Thu, 10 Aug 2023 11:41:06 -0400 From: Stephen Frost To: lejeczek Cc: pgsql-admin@lists.postgresql.org Subject: Re: .history': No such file or directory - a symptom of ? Message-ID: References: <2dfed6d4-115e-389e-b265-49a0d8599ecb.ref@yahoo.co.uk> <2dfed6d4-115e-389e-b265-49a0d8599ecb@yahoo.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vvXy+4zQIj0/yHgH" Content-Disposition: inline In-Reply-To: <2dfed6d4-115e-389e-b265-49a0d8599ecb@yahoo.co.uk> User-Agent: Mutt/2.1.4 (2021-12-11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --vvXy+4zQIj0/yHgH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * lejeczek (peljasz@yahoo.co.uk) wrote: > What is that - as per subject - a symptom of exactly? Arguably, a poor restore command being used ... PostgreSQL will request .history files when doing recovery and will keep requesting them, by default, until it finds that one isn't there- it will then target the last timeline that it found to perform replay to (target timeline = latest). We do also look for .history files when going through the promotion process and similarily will keep checking for timeline files until we don't find one and then that's the timeline we will move to for the promotion and we'll then immediately push a new .history file into the archive to 'claim' that timeline. Basically, it's not an error and it's entirely intentional that it works that way and your restore command probably shouldn't be complaining about it really (and that's where the actual 'No such file or directory' bit is coming from- not from PG itself). > I get that there was an issue, but with more details explained. Perhaps > there are docs which explain that? Much more likely that there wasn't actually any issue... > When it happens I take slave down and do _pg_basebackup_ off the master - > but is there a more "civilized" way to "push" the slave back in sync, maybe > without taking slave off-line? Not following this bit at all. There being a message about PG not finding a .history file during restore or promotion isn't actually an indication of anything having gone wrong or that the replica is out of sync. In other words, I don't know that you needed to actually do anything. Is there some reason you think you did need to do something beside that message being in the log..? Thanks, Stephen --vvXy+4zQIj0/yHgH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEwf6gbxKhD863zrx/7WyKOINHZFUFAmTVBRAACgkQ7WyKOINH ZFW0/xAAwpZLc/uLF//RVNCG0S+ghzL61kuejDbPLNwJLzZbwagkpt/JMwJmDMfX /03IOyYFBxhre4BA7GTMMXdOy7TlCuAoJeMg48+XxibWPG8b0OhhrPB7QzowzfJB f12nNoITxCsaE5P01b1RAYjFDDmJT7LeEJFt0DvBVzsv2W9wxnl9KHIOIBm+/L55 OG1pRXWQ1K0iTT606fqFRTMJ4v1ZV6fQv2C0wzZzg7/0IBAUKDEBF9DpPRVz6+4c vnu9C0ItVOeq8KRj6sNRfqLNjlGedqiLJl0/Z2MIP/cERJdFQkMxm48BNtHL7Eps jbvIuD8wTF5WR60LDJokutbHLPvKxxRWTAZrJJgfiAZOQJ2juzCiaM30rUQdjMty 8vQz3BZwieTpE6ZzNishQU9nNypzJSkP5w0r7vBrVJ51/JlKWwptM00tI7d5uJ9M SCh86AwcoiTvxPrEEAh5Kj7NqLRxzAXcURtRONaPB0F2WBdqXptggdPn9BqiA7rf MQz4+czvpRbNg6+Ko3H+iraHhS3HoVVpGl/LvW/Qb6HiKZdRiYCTx2frkdVeMnND EcDRglOfCAQCxP69OqNlcBh4QrDElDhF1F6IUcnI+0GkMlghG9cvnsbfjRCCuJuo 2I458jDu+eLuTMOgYJM/GIz+U71ReACK4lbOZ2J+wjtRqUFI4F4= =M6eZ -----END PGP SIGNATURE----- --vvXy+4zQIj0/yHgH--