Re: Seeking practice recommendation: is there ever a use case to have two or more superusers?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Bryn Llewellyn <bryn(at)yugabyte(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Seeking practice recommendation: is there ever a use case to have two or more superusers?
Date: 2022-11-22 00:49:42
Message-ID: CAKFQuwZg2-Lsrjf=-LF8q+CN+4GPK1bJcEA_zia4XUo81ZLQKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 21, 2022 at 5:30 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 11/21/22 15:05, Bryn Llewellyn wrote:
> >
> > In fact, David Johnston did unequivocally challenge my strawman a couple
> of turns back, thus:
> >
>
>
> And the equivocal additions later in the post:
>

Yeah, even when I try to be unequivocal I tend to fail...Devil's Advocate
is another role I enjoy playing.

> >
> > There's also the caveat that a "drop" attempt by a superuser for a
> single object owned by the bootstrap superuser (say, the
> "pg_catalog.pg_terminate_backend()" function) in some database causes an
> error with the message "cannot drop function... because it is required by
> the database system". (At least, this is what my tests have shown with a
> smallish sample of drop targets.)

There are some protections in place to prevent the superuser from shooting
themselves in the foot accidentally. They are readily disabled though,
through a simple SET command in the session.

> Superuser is superuser, there is no magic associated with the bootstrap
> superuser.
>
>
Not quite true, it is magical in that every initdb thing that needs an
owner has it as an owner. And, at least not easily or desirably, that
ownership cannot be transferred, which makes dropping said role problematic.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message chris navarroza 2022-11-22 06:25:31 system variable can be edited by all user?
Previous Message Adrian Klaver 2022-11-22 00:30:36 Re: Seeking practice recommendation: is there ever a use case to have two or more superusers?