agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check that a promoted standby keeps its 8-byte OID counter
Date: Mon, 14 Sep 2026 03:07:38 +0000
Message-ID: <E1x5x2g-00000000DvO-1US6@gemulon.postgresql.org> (raw)

Check that a promoted standby keeps its 8-byte OID counter

The counter reaches a standby through XLOG_NEXTOID and checkpoint
records.  This commit adds a test to move the next OID past the 2^32
limit on a primary and read it back from the promoted standby.  This
reuses the same trick as some of the previous tests, with a pg_resetwal
command setting the next OID to be larger than 2^32, combined with a
check based on pg_control_checkpoint().

This closes a testing gap of cb298616463d regarding the replay of
XLOG_NEXTOID, where this WAL record has been updated to pass down an
Oid8 value.  By default, regression tests would use OIDs way below the
UINT32_MAX limit.

Author: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/CAHWVJhGkb1n_QSS4M=PKJD5HHcwK3KXpFwVxoRVLzAG3j+2fhQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1cd8669179f41b939c08e84ddddd3bdce0e095ea

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 17 +++++++++++++++++
1 file changed, 17 insertions(+)



Message-ID: <E1x5x2g-00000000DvO-1US6@gemulon.postgresql.org>
Permalink:  ../E1x5x2g-00000000DvO-1US6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x5x2g-00000000DvO-1US6@gemulon.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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Check that a promoted standby keeps its 8-byte OID counter
  In-Reply-To: <E1x5x2g-00000000DvO-1US6@gemulon.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox