pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: lejeczek <peljasz@yahoo.co.uk>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: .history': No such file or directory - a symptom of ?
Date: Thu, 10 Aug 2023 11:41:06 -0400
Message-ID: <ZNUFEkB1GCblJf6r@tamriel.snowman.net> (raw)
In-Reply-To: <2dfed6d4-115e-389e-b265-49a0d8599ecb@yahoo.co.uk>
References: <2dfed6d4-115e-389e-b265-49a0d8599ecb.ref@yahoo.co.uk>
	<2dfed6d4-115e-389e-b265-49a0d8599ecb@yahoo.co.uk>

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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../ZNUFEkB1GCblJf6r@tamriel.snowman.net/2-signature.asc)
  download

view thread (5+ messages)  latest in thread

Message-ID: <ZNUFEkB1GCblJf6r@tamriel.snowman.net>
Permalink:  ../ZNUFEkB1GCblJf6r@tamriel.snowman.net/
Also on:    postgresql.org/message-id/ZNUFEkB1GCblJf6r@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sfrost@snowman.net, peljasz@yahoo.co.uk, pgsql-admin@lists.postgresql.org
  Subject: Re: .history': No such file or directory - a symptom of ?
  In-Reply-To: <ZNUFEkB1GCblJf6r@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox