pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_visibility: Restrict access to more relation types
Date: Fri, 06 Nov 2026 03:11:44 +0000
Message-ID: <E1xPAMi-00000000PJF-1M4u@gemulon.postgresql.org> (raw)

pg_visibility: Restrict access to more relation types

Temporary relations of other sessions have their own local pages.
Temporary and unlogged relations have no storage during recovery.
pg_visibility did not check for either cases, leading to inconsistent
results or confusing error messages, like some "ERROR: could not open
file".

This commit adds checks for both cases, so as a clean errors are
returned instead of the previous mix of incorrect results or errors,
depending on the function called and the relation whose information is
requested.

Author: Jim Jones <jim.jones@uni-muenster.de>
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Surya Poondla <suryapoondla4@gmail.com>
Discussion: https://postgr.es/m/82ba0876-6127-4770-b900-aa1bd52abfed@uni-muenster.de

Branch
------
master

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

Modified Files
--------------
contrib/pg_visibility/pg_visibility.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)



Message-ID: <E1xPAMi-00000000PJF-1M4u@gemulon.postgresql.org>
Permalink:  ../E1xPAMi-00000000PJF-1M4u@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xPAMi-00000000PJF-1M4u@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: michael@paquier.xyz
  Subject: Re: pgsql: pg_visibility: Restrict access to more relation types
  In-Reply-To: <E1xPAMi-00000000PJF-1M4u@gemulon.postgresql.org>
  References: <E1xPAMi-00000000PJF-1M4u@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