pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reject currtid2() on unlogged tables during recovery.
Date: Wed, 21 Oct 2026 18:13:18 +0000
Message-ID: <E1xJaoQ-00000000Dj8-3ljJ@gemulon.postgresql.org> (raw)

Reject currtid2() on unlogged tables during recovery.

Commit 1e707d32564 made COPY TO report a proper error for unlogged
tables during recovery. currtid2() has the same problem: it reads the
table directly without going through the planner, so on a standby it
failed with a low-level error for an unlogged table:

ERROR:  could not open file "base/5/16384": No such file or directory

Check for this case and report the same error as SELECT. No test is
added, as currtid2() is an undocumented internal function.

Backpatch to all supported versions, like commit 1e707d32564.

Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
Author: Jim Jones <jim.jones@uni-muenster.de>
Discussion: https://postgr.es/m/CAD21AoDNa7pL760_23AN_wYPMkWXCt+Kw0_vJAcci4R5DoCQGg@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a5b925cfcc9bd2a5c7caf02887794b497ff2ab26

Modified Files
--------------
src/backend/utils/adt/tid.c | 7 +++++++
1 file changed, 7 insertions(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1xJaoQ-00000000Dj8-3ljJ@gemulon.postgresql.org>
Permalink:  ../E1xJaoQ-00000000Dj8-3ljJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xJaoQ-00000000Dj8-3ljJ@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 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-committers@postgresql.org
  Cc: msawada@postgresql.org
  Subject: Re: pgsql: Reject currtid2() on unlogged tables during recovery.
  In-Reply-To: <E1xJaoQ-00000000Dj8-3ljJ@gemulon.postgresql.org>
  References: <E1xJaoQ-00000000Dj8-3ljJ@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox