public inbox for [email protected]  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <[email protected]>
To: PostgreSQL General <[email protected]>
Subject: Is there any reason why pg_walfile_name() doesn't take timeline change into consideration?
Date: Mon, 18 May 2026 14:27:08 +0200
Message-ID: <[email protected]> (raw)

Hi,
I tried on a server that is on timeline 7 now, with .history being:

1       A9/5E0000A0     no recovery target specified
2       127/EB0000A0    no recovery target specified
3       127/F40000A0    no recovery target specified
4       128/170000A0    no recovery target specified
5       188/C70000A0    no recovery target specified
6       7B8/90000A0     no recovery target specified


When I wal file that is "current", i get sensible filename:

=# select pg_walfile_name('800/123');
     pg_walfile_name
══════════════════════════
 000000070000080000000000
(1 row)

But when I try to find walfile for old lsn, from older timeline, I'm getting bad results:

=# select pg_walfile_name('125/123');
     pg_walfile_name
══════════════════════════
 000000070000012500000000
(1 row)

Timeline 7 was was "there" when wal lsn was 125/…. Is it just missing
functionality, or am I missing something more complicated?

Best regards,

depesz







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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Is there any reason why pg_walfile_name() doesn't take timeline change into consideration?
  In-Reply-To: <[email protected]>

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

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