pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: imchifan@mail.com
Subject: BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
Date: Wed, 11 Nov 2026 05:46:08 +0000
Message-ID: <19867-e274a8f5cd6d63f8@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19867
Logged by:          Faye
Email address:      imchifan@mail.com
PostgreSQL version: 18.6
Operating system:   Linux/amd64
Description:        

pg_verifybackup accepts a backup-manifest Timeline value of 4294967297,
which is outside the range of PostgreSQL timeline identifiers, and proceeds
to manifest checksum validation. It should reject the value as out of range
while parsing the manifest because a PostgreSQL timeline identifier cannot
represent it. The reproducer requires a disposable local PostgreSQL instance
that permits pg_basebackup.

How to repeat:

    d="backup-test"
    pg_basebackup -h /tmp -D "$d" -X none --no-sync
--manifest-checksums=NONE
    sed -i '0,/"Timeline": [0-9][0-9]*/s//"Timeline": 4294967297/'
"$d/backup_manifest"
    grep -o '"Timeline": [0-9]*' "$d/backup_manifest" | head -1
    pg_verifybackup --no-parse-wal "$d"

The recorded output is:

    "Timeline": 4294967297
    pg_verifybackup: error: manifest checksum mismatch

The checksum error shows that the out-of-range Timeline value passed
manifest parsing and verification continued to checksum validation. No crash
or data corruption was observed. The external numeric value appears to be
narrowed without first validating the destination type's range.

The issue was reproduced on PostgreSQL 20devel, PostgreSQL 18.6, and
PostgreSQL 17.11 on Linux/AMD64. This occurs when pg_verifybackup checks a
backup manifest whose Timeline value exceeds the range of PostgreSQL
timeline identifiers.








view thread (3+ messages)  latest in thread

Message-ID: <19867-e274a8f5cd6d63f8@postgresql.org>
Permalink:  ../19867-e274a8f5cd6d63f8@postgresql.org/
Also on:    postgresql.org/message-id/19867-e274a8f5cd6d63f8@postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, imchifan@mail.com
  Subject: Re: BUG #19867: pg_verifybackup accepts out-of-range Timeline in backup manifest
  In-Reply-To: <19867-e274a8f5cd6d63f8@postgresql.org>
  References: <19867-e274a8f5cd6d63f8@postgresql.org>

* 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