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 1hvkhl-0005LU-DN for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Aug 2019 15:51:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvkhk-0007G8-05 for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Aug 2019 15:51:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvkhj-00078Y-K8 for pgsql-hackers@lists.postgresql.org; Thu, 08 Aug 2019 15:51:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvkhh-0004E9-36 for pgsql-hackers@postgresql.org; Thu, 08 Aug 2019 15:51:51 +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 x78FpjUD030435; Thu, 8 Aug 2019 11:51:45 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: clean up obsolete initdb locale handling In-reply-to: <27394.1565276193@sss.pgh.pa.us> References: <27394.1565276193@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 08 Aug 2019 10:56:33 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30433.1565279505.1@sss.pgh.pa.us> Date: Thu, 08 Aug 2019 11:51:45 -0400 Message-ID: <30434.1565279505@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > ... In particular, I'm concerned that this patch will > result in subtle changes in what settings get chosen during initdb. OK, after reviewing the code a bit more I take that back --- initdb's choices are entirely made within initdb. However, I don't much like the choice to set LC_COLLATE and LC_CTYPE differently. That seems to be risking weird behavior, and for what? I'd be inclined to just remove the WIN32 stanza, initialize all three of these variables with "", and explain it along the lines of * In the postmaster, absorb the environment values for LC_COLLATE * and LC_CTYPE. Individual backends will change these later to * settings taken from pg_database, but the postmaster cannot do * that. If we leave these set to "C" then message localization * might not work well in the postmaster. That ends up being no code change in main.c, except on Windows. I concur that we can drop the transmission of LC_COLLATE and LC_CTYPE via environment variables. regards, tom lane