From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pageinspect: Reject access to temp and unlogged relations during
Date: Mon, 09 Nov 2026 06:47:23 +0000
Message-ID: <E1xQJA3-00000000nAL-3Q0i@gemulon.postgresql.org> (raw)
pageinspect: Reject access to temp and unlogged relations during recovery
Unlogged and temporary relations have no data on a standby, except for
the init fork of an unlogged relation. Attempting to use the functions
of pageinspect for such cases failed with the following ERROR:
ERROR: could not open file "base/MMM/NNN": No such file or directory
Such attempts are now blocked. The module already prevented the access
to temporary tables from other sessions. This check is moved into a new
common routine, merged with the new check for temp/unlogged tables at
recovery.
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Author: Jim Jones <jim.jones@uni-muenster.de>
Author: Kirill Reshke <reshkekirill@gmail.com>
Author: Surya Poondla <suryapoondla4@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/82ba0876-6127-4770-b900-aa1bd52abfed@uni-muenster.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/553262aff40d34711e04e989e91d1da430589822
Modified Files
--------------
contrib/pageinspect/btreefuncs.c | 20 ++------------------
contrib/pageinspect/hashfuncs.c | 5 +----
contrib/pageinspect/pageinspect.h | 2 ++
contrib/pageinspect/rawpage.c | 39 ++++++++++++++++++++++++++++++---------
4 files changed, 35 insertions(+), 31 deletions(-)
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: michael@paquier.xyz
Subject: Re: pgsql: pageinspect: Reject access to temp and unlogged relations during
In-Reply-To: <E1xQJA3-00000000nAL-3Q0i@gemulon.postgresql.org>
References: <E1xQJA3-00000000nAL-3Q0i@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