Re: superuser() shortcuts

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: superuser() shortcuts
Date: 2014-10-25 00:39:03
Message-ID: 544AF127.5020902@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/23/14, 6:23 PM, Alvaro Herrera wrote:
> Brightwell, Adam wrote:
>
>>> If we were to make it consistent and use the old wording, what do you
>>> think about providing an "errhint" as well?
>>>
>>> Perhaps for example in slotfuncs.c#pg_create_physical_replication_stot:
>>>
>>> errmsg - "permission denied to create physical replication slot"
>>> errhint - "You must be superuser or replication role to use replication slots."
>
> Sure.
>
>> As I started looking at this, there are multiple other places where
>> these types of error messages occur (opclasscmds.c, user.c,
>> postinit.c, miscinit.c are just a few), not just around the changes in
>> this patch. If we change them in one place, wouldn't it be best to
>> change them in the rest? If that is the case, I'm afraid that might
>> distract from the purpose of this patch. Perhaps, if we want to
>> change them, then that should be submitted as a separate patch?
>
> Yeah. I'm just saying that maybe this patch should adopt whatever
> wording we agree to, not that we need to change other places. On the
> other hand, since so many other places have adopted the different
> wording, maybe there's a reason for it and if so, does anybody know what
> it is. But I have to say that it does look inconsistent to me.

Keep in mind that originally the ONLY special permissions "thing" we had was rolsuper. Now we also have replication, maybe some others, and there's discussion of adding a special "backup role".

In other words, the situation is a lot more complex than it used to be. So if cleanup is done here, it would be best to try and account for this new stuff.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-10-25 00:51:07 Comment patch for bgworker.c
Previous Message Jim Nasby 2014-10-25 00:31:20 Re: ExclusiveLock on extension of relation with huge shared_buffers