On Thu, Oct 27, 2022 at 4:02 PM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes:
> Yes, the description for --username probably should be modified to read:
> "Selects the user name of the cluster's bootstrap superuser."
Yeah, perhaps. The term "bootstrap superuser" is reasonably well
established by now --- I count half a dozen uses in our SGML docs
and another dozen or so in the code --- and it's certainly more
specific than "database superuser". We should probably create
a glossary entry for it and then change all the uses of "database
superuser" as appropriate.
+1
However ... it looks to me like some of those uses just mean to
distinguish between Postgres-specific superuser-dom as opposed
to whatever the term might mean out in the operating system.
But I'm not sure that anybody really uses that term for an OS-level
concept on any popular OS, so it feels a bit pedantic as well
as confusing. Should we leave those usages alone, or reduce them
to just "superuser"?
Upon a third reflection I decided that leaving "database superuser" in place is preferred; it is fairly pervasive in the code, docs, and translations. I would suggest documenting both "bootstrap superuser" and "database superuser", making it clear that "database superuser" means any role in the cluster that has the superuser attribute while "bootstrap superuser" is specifically that superuser which was created by initdb and thus owns all initialized objects including the catalogs in all databases in the cluster.
I'm not sure what you are referring to with respect to OS-level references but those ideally will not refer to superuser at all - reserving the concept for the product. admin/root/sudo or even just os-user suffice for the few places where the two worlds intersect.
David J.