Re: Misplaced superuser check in pg_log_backend_memory_contexts()

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Misplaced superuser check in pg_log_backend_memory_contexts()
Date: 2021-06-08 14:30:00
Message-ID: ae89efa3-d9e9-d8f4-d1c9-16dbbcfa6089@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/06/08 11:49, Michael Paquier wrote:
> On Sun, Jun 06, 2021 at 11:13:40AM -0400, Tom Lane wrote:
>> Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
>>> However +1 for the patch, as it seems more consistent to always get a
>>> permission failure if you're not a superuser.
>>
>> Yeah, it's just weird if such a check is not the first thing
>> in the function. Even if you can convince yourself that the
>> actions taken before that don't create any security issue today,
>> it's not hard to imagine that innocent future code rearrangements
>> could break that argument. What's the value of postponing the
>> check anyway?
>
> Thanks for the input, I have applied the patch.

Thanks a lot!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-06-08 14:39:24 Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Previous Message Peter Eisentraut 2021-06-08 14:12:44 Re: SSL SNI