Re: [HACKERS] [PATCH] pageinspect function to decode infomasks - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] [PATCH] pageinspect function to decode infomasks
Date
Msg-id 20190910023748.GB1635@paquier.xyz
Whole thread Raw
In response to Re: [HACKERS] [PATCH] pageinspect function to decode infomasks  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Tue, Sep 10, 2019 at 07:51:08AM +0530, Amit Kapila wrote:
> It will look bit strange to use heapam as a prefix for this function
> when all others use heap.  I guess if we want to keep it AM specific,
> then the proposed name (heap_infomask_flags) is better or
> alternatively we can consider heap_tuple_infomask_flags?

Using "heap_" as prefix of the function looks like the best choice to
me and that's more consistent with the other functions we have
already.  Using "tuple" looks sensible as well so the last name you are
proposing sounds like a good alternative.

> At the beginning of pageinspect documentation page, we have a line
> "All of these functions may be used only by superusers.".  We need to
> change that and then maybe give some explanation of why this
> particular function will be allowed to non-superusers.  BTW, do you
> have any use case in mind for the same because anyway we need
> superuser privileges to get the page contents and I think this
> function can't be used independently?

I would still keep it as superuser-restricted, to avoid any risks with
people playing with the internals of this function.  pageinspect is
sensitive enough.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] [PATCH] pageinspect function to decode infomasks
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] [PATCH] pageinspect function to decode infomasks