Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if5Rf-0007M3-EC for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 17:06:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1if5Rd-0003Zx-RY for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 17:06:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if5Rd-0003WO-DK for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 17:06:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1if5Ra-0005CB-Cv for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 17:06:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBBH6UjX018834; Wed, 11 Dec 2019 12:06:30 -0500 From: Tom Lane To: Adrian Klaver cc: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= , "pgsql-generallists.postgresql.org" Subject: Re: PGUSER and initdb In-reply-to: <8042e8d3-5528-c328-393f-218420aad4f5@aklaver.com> References: <61717e4b-3e69-2bb9-7ef8-1849a8900133@aklaver.com> <4624CAAA-6E67-42D8-9F66-D2EB926443CA@ya.ru> <8042e8d3-5528-c328-393f-218420aad4f5@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Wed, 11 Dec 2019 08:31:00 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <18832.1576083990.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Dec 2019 12:06:30 -0500 Message-ID: <18833.1576083990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 12/11/19 5:18 AM, =D0=9E=D0=BB=D0=B5=D0=B3 =D0=A1=D0=B0=D0=BC=D0=BE=D0= =B9=D0=BB=D0=BE=D0=B2 wrote: > This utility, like most other PostgreSQL utilities, also uses the enviro= nment 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