Re: PGUSER and initdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Олег Самойлов <splarv(at)ya(dot)ru>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PGUSER and initdb
Date: 2019-12-11 17:06:30
Message-ID: 18833.1576083990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> On 12/11/19 5:18 AM, Олег Самойлов wrote:
> This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see Section 33.14).
> https://www.postgresql.org/docs/12/libpq-envars.html
> PGUSER behaves the same as the user connection parameter.
>> This is don't work with `initdb` and `pg_ctl initdb`.

This seems like nonsense to me. The initdb documentation says perfectly
clearly that the initial superuser's name is set by -U. It does not
say anything about PGUSER. I think the reference to libpq in the docs
probably should be taken out, because initdb never uses libpq to make
a connection, so libpq's defaults are not relevant.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-12-11 17:19:53 Re: PGUSER and initdb
Previous Message Adrian Klaver 2019-12-11 16:31:00 Re: PGUSER and initdb