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 1jTuuf-0001u8-Fb for pgsql-general@arkaria.postgresql.org; Wed, 29 Apr 2020 22:10:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTuue-0004WX-4i for pgsql-general@arkaria.postgresql.org; Wed, 29 Apr 2020 22:10:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTuud-0004WP-2Q for pgsql-general@lists.postgresql.org; Wed, 29 Apr 2020 22:10:39 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTuuZ-0005zY-UX for pgsql-general@postgresql.org; Wed, 29 Apr 2020 22:10:37 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 3DFEF7DD; Wed, 29 Apr 2020 18:10:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 29 Apr 2020 18:10:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=X 3Qo8mOk58iSG63bhKMl7EBqaPfzjaDKeMPOMwjSbik=; b=eMj58FrPg4bTR7bBR HKKX1so1Fjn4Jml0Esc6Sjpn+GdXF7Dqmn6qGwlcKHrKUnzQ5rr8Pg8kmdpNJU6g KCMJBDrMVLOCBI2gVHhTVcl6L7ulyg1UDDoHVbaE18XxkRelzKQ760wqywJ406Wx MUaM5ovsy73rSyf4aFUxqicejmKIgPNJJz1UMbwpkGwQWck/09bzE04Hh9UQEbHv 6Ts2eGS424XzjSKCJu+daJqKkT+esNNh6lwJwMqfzMGXAR+rRAspfL6x2oAB8CYe OC2SEH4YALB/XVkRisIjkA3dD9co6BMeAZwVD1Db3GQtDXVtNb8TQ9Sq3C/mG72P GzxlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=X3Qo8mOk58iSG63bhKMl7EBqaPfzjaDKeMPOMwjSb ik=; b=tjCZaLPiTquSsOnap+eIFvyKyaMS/hvDE2nFB3McJoqD3B9hCIhmpBKU9 xNy/3PBSqc8kg18udttj0/Y386e1BZokTSStmkML7Avz7VM5IwzAcv2K9yekozhy RBiqkK3HPluoBpQTjZkn/+HgFKqrxC5vpsyvh/9+S6y5ctXSedScMhrvxPHG1w7z Xy1IAxGPAvDj8ZkLjp9EOwYA1wxbghxf3wuvBAWbn1gR6Vg9gAMz6nY8bgkzWNO0 MJtUf4iRqdgOH8H+c3n5xMfNNNUhuIQyizJGEHIB0yvbzxV9qTyJO/lg6yNyWZX5 HoPi5ucqWIDxUH8t3GhXYLe+cCyjg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieeggddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepvdeuudfgkeekledugeduueffieefieeutdelvdeifedt udehveffveegkeeftdehnecuffhomhgrihhnpehuthhfqdekrdhimhdpphhoshhtghhrvg hsqhhlrdhorhhgpdhsvghilhgvrhdruhhsnecukfhppeeljedruddufedrvddtjedrudef keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrug hrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (97-113-207-138.tukw.qwest.net [97.113.207.138]) by mail.messagingengine.com (Postfix) with ESMTPA id B06FE3065F04; Wed, 29 Apr 2020 18:10:31 -0400 (EDT) Subject: Re: Mixed Locales and Upgrading To: Don Seiler , Tom Lane Cc: Michael Paquier , Postgres General 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> From: Adrian Klaver Message-ID: <6bcc201e-e3da-329b-ca7f-d90c9986a769@aklaver.com> Date: Wed, 29 Apr 2020 15:10:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/29/20 1:10 PM, Don Seiler wrote: > On Tue, Apr 7, 2020 at 11:41 AM Don Seiler > wrote: > > > Follow-up question, the locale setting on the host would still be > set to en_US (as would the postgres and template0 databases). Should > I look to change that locale on the system to en_US.UTF-8, or even > just for the postgres user that the DB cluster runs as? What are the > ramification for doing (or not doing) so? > > > One more question around the GUC settings for locale. It is currently > set to this: > > # select name,setting from pg_settings where name like 'lc%'; >     name     | setting > -------------+--------- >  lc_collate  | en_US >  lc_ctype    | en_US >  lc_messages | >  lc_monetary | C >  lc_numeric  | C >  lc_time     | C > > 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'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?: https://www.postgresql.org/docs/12/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT "lc_messages (string) 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 OS locale LC_MESSAGES is set to en_US on the primary but I also see > it is set to en_US on the newer replica hosts. What value would be used > for lc_messages? I'm trying to create an empty DB with these same > settings but if I omit --lc-messages it uses the OS locale value, and I > can't set it to an empty string. > > Don. > > -- > Don Seiler > www.seiler.us -- Adrian Klaver adrian.klaver@aklaver.com