Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTwIT-0004gm-81 for pgsql-general@arkaria.postgresql.org; Wed, 29 Apr 2020 23:39:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTwIS-0004hj-2W for pgsql-general@arkaria.postgresql.org; Wed, 29 Apr 2020 23:39:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTwIR-0004hc-RK for pgsql-general@lists.postgresql.org; Wed, 29 Apr 2020 23:39:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTwIL-0008M6-Ff for pgsql-general@postgresql.org; Wed, 29 Apr 2020 23:39:19 +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 03TNd80i009140; Wed, 29 Apr 2020 19:39:09 -0400 From: Tom Lane To: Adrian Klaver cc: Don Seiler , Michael Paquier , Postgres General Subject: Re: Mixed Locales and Upgrading In-reply-to: <6bcc201e-e3da-329b-ca7f-d90c9986a769@aklaver.com> References: <5624.1584372534@sss.pgh.pa.us> <31606.1584453361@sss.pgh.pa.us> <1182.1584456350@sss.pgh.pa.us> <20200318022525.GE214947@paquier.xyz> <1505.1585603832@sss.pgh.pa.us> <6bcc201e-e3da-329b-ca7f-d90c9986a769@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Wed, 29 Apr 2020 15:10:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <9138.1588203548.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 29 Apr 2020 19:39:08 -0400 Message-ID: <9139.1588203548@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 4/29/20 1:10 PM, Don Seiler wrote: >> On Tue, Apr 7, 2020 at 11:41 AM Don Seiler > > wrote: >> Since I'm not changing the postgres or template0 databases (leaving >> those as en_US/LATIN1), do I keep lc_collate/lc_ctype as en_US? It's >> just the template1 and application database that I've set to en_US.UTF-8. I believe that those settings only affect locale-dependent processing in the postmaster and/or background processes, which there should be little or none of anyway. Processes connected to specific databases will adopt the settings defined for those databases. >> I'm also struggling to see how lc_messages is an empty string. It is >> commented out in postgresql.conf but suggests 'C' will be the default. > Are you sure?: > Sets the language in which messages are displayed. Acceptable > values are system-dependent; see Section 23.1 for more information. If > this variable is set to the empty string (which is the default) then the > value is inherited from the execution environment of the server in a > system-dependent way. ..." The "system-dependent way" is "adopt whatever the LANG/LC_foo environment variables say at server startup", at least on non-Windows machines. I think that C is the fallback if none of those variables are set, though. Short answer is you shouldn't need to mess with these. regards, tom lane