pageinspect some function no need superuser priv

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pageinspect some function no need superuser priv
Date: 2025-10-14 13:26:56
Message-ID: CACJufxHA74kt6pqJTwKmQ_EzZApJ1fXK2sURESyT=kc71r0E9g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

just came to my mind.

If you're the table owner, you should be allowed to use get_raw_page (and other
pageinspect module functions)?
We can use RangeVarGetRelidExtended with
RangeVarCallbackOwnsRelation to perform the ownership check.

Attached is a draft POC.
Am I missing anything obvious?

Attachment Content-Type Size
page_inspect_owner_can_query.diff text/x-patch 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-10-14 13:32:20 Re: pageinspect some function no need superuser priv
Previous Message Philip Alger 2025-10-14 13:14:12 Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement