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 1hL7XZ-0004Vp-GJ for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2019 14:45:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hL7XX-000298-BE for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2019 14:45:55 +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 1hL7XW-000291-Rr for pgsql-general@lists.postgresql.org; Mon, 29 Apr 2019 14:45:55 +0000 Received: from smtp55.i.mail.ru ([217.69.128.35]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hL7XU-00019l-6M for pgsql-general@postgresql.org; Mon, 29 Apr 2019 14:45:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:Subject:From:Reply-To:To; bh=zUyEoJwzw58ijZ/9XG+xrNdiUjFCVCnQm9s+wESdX20=; b=Vgga1qetEB6PmVmlUrEctmliKWqPvVcEeKFxKm2F/vg0iU4TATEuVqrIX17YGRCqtYf20hbh/AfWKJNNIo8EhEVS/GqPCqqyyXorMT0lsL/mANwYKMRwrk+yDEtlRcLOtpGkhuOd9hAMUjdbZpD+/nAwAgfp942pcHwUn4IpxcY=; Received: by smtp55.i.mail.ru with esmtpa (envelope-from ) id 1hL7XS-0003Nb-6l for pgsql-general@postgresql.org; Mon, 29 Apr 2019 17:45:50 +0300 To: pgsql-general General Reply-To: rihad From: rihad Subject: Upgrading locale issues Message-ID: Date: Mon, 29 Apr 2019 18:45:48 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: smtp55.i.mail.ru; auth=pass smtp.auth=rihad@mail.ru smtp.mailfrom=rihad@mail.ru X-77F55803: CF41D5CA8C6D3C0C7F9F52485CB584D7FE68477BFBFC01B4FACE991E273B43DC9E46AF1126375D85824B16EE1E335080DDDE7B70B5F5C79F X-7FA49CB5: 0D63561A33F958A5BC6F322FA498E129EDF45C8B446C80E04C69B5CA63520F1F8941B15DA834481FA18204E546F3947C6A1CB4668A9CA5FAF6B57BC7E64490618DEB871D839B7333395957E7521B51C2545D4CF71C94A83E9FA2833FD35BB23D27C277FBC8AE2E8B4871F77D444DC01FA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C224975765671F80319073AA81AA40904B5D9CF19DD082D7633A093541453170D46FCD81D268191BDAD3D78DA827A17800CE74A161BC97E2066CACD04E86FAF290E2DBBC930A3941E20C675ECD9A6C639B01B78DA827A17800CE7D2406DDE9503173F451BF9C265F64C4875ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57285124B2A10EEC6C00306258E7E6ABB4E4A6367B16DE6309 X-Mailru-Sender: B19AB4DAF1EA2FB5FE124A2F05C748DD97EEBF9052CA1F44F5E6AE83803A2CCE91CE35F2FE2EB445ABBFE0CF075BC50BFB559BB5D741EB96004FA9CEFBA991DA3A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi. Today we run pg_ctl promote on a slave server (10.7) and started using it as a master. The OS also got upgraded FreeBSD 10.4 -> FreeBSD 11.2. And you guessed it, most varchar indexes got corrupted because system local changed in subtle ways. So I created the extension amcheck and reindexed all bad indexes one by one. Is there any way to prevent such things in the future? Will switching to ICU fix all such issues? The problem with it is that ICU collations are absent in pg_collation, initdb should be run to create them, but pg_basebackup only runs on an empty base directory, so I couldn't run initdb + pg_basebackup to prepare the replica server. I believe I can run the create collation command manually, but what would it look like for en-x-icu? CREATE COLLATION "en-ix-icu" (provider = icu, locale = 'en-x-icu'); is that it? But what about version etc?         collname        | collnamespace | collowner | collprovider | collencoding |    collcollate    | collctype     | collversion  en-x-icu               |            11 |        10 | i            |           -1 | en                | en                | 153.88 Thanks.