Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsiOl-004wfz-Sn for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 13:14:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsiOi-00DRiz-KH for pgsql-general@arkaria.postgresql.org; Thu, 13 Mar 2025 13:14:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsiOh-00DRir-Up for pgsql-general@lists.postgresql.org; Thu, 13 Mar 2025 13:14:52 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsiOd-002ebW-22 for pgsql-general@lists.postgresql.org; Thu, 13 Mar 2025 13:14:51 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-6f74b78df93so9735787b3.0 for ; Thu, 13 Mar 2025 06:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; t=1741871687; x=1742476487; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=cfXMjs9klHkl5mABi5knD2f6Uu+z3q+9CRnZEIeqL1o=; b=fzhJoaDogB4o6k3IRcSOl8bTcedNJuIwk+8+/OnBI/Qz4bZyrwPj/PGUsgi86tXxCM bbaqVxuXjjjbTYPDqXTgqJBqZuegVzU29wntj5Li4ZdjagoyQsK1SqtXOLk+niDvUK5f vlFpQOUxtPKlMRRknk2BiH2TOdIwZw4tmT2gVY4CWqKZiwM4r/sK8TTw1Fqm4uR6sutq 9PlWZ1R/osdxC2Ts6DvCLx3KBqGRk8L/B5LvL6dgu/iOjL5AXRq2noA80reHj2kPkgfL ve1drE7JFnSVrhtPx+yGRYkmJFmcWsTmf8KyDSA/E9H4yKYLQZrFckfIjzU2VD0QcnrA 2jbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741871687; x=1742476487; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cfXMjs9klHkl5mABi5knD2f6Uu+z3q+9CRnZEIeqL1o=; b=I5GrfSw1fVVRRDKLZzqIngXA6qQw4Piz39FwlTwwEfz0PkLh0BVnU6dAN0h+iwLX2v w/wu+tzV/T1tM3uVPEmqZWreJEjWtA0npPORADiWLxT2Ac6rtvLL9LslYFpGvzcwubyO iuP/Jegg4Nad6CgKEOyO/OUFBSSAsXQ+XNhA0+DuCfM21KxKhVEOciBouaBHt8nVQKid 2TSn4E7+M5b1tWKEu5dnxlP5qslLsdEDJVjmsKrOfkX9TD2cDx8qmagP9bwbQQi9E93i qgYVvnu9RqvwYI4b3u/g2Mq5G0kfWtHkXswmC6rqv3rWMX/rV+y404yoeqn7NPF5WEcm j9XQ== X-Forwarded-Encrypted: i=1; AJvYcCXyXmdqviN7dEpqp4vGX8ZKX5hzSoalrvNplt7u15lrjYYT7d+l9upUOwQAnH/4fVaZkVQo4e7gKjSg6CoD@lists.postgresql.org X-Gm-Message-State: AOJu0YzYPU/m94x997CCHlou1/mrRlFgFR+3Zqiix7Hx99rgxHFJWvqc H3bmIsO6sRsFqZHwO3OGehDt0AVkaGdiWGqboTDWlOHFda7tcI1561l78wVn+o/8e8p87F+ALMo 6 X-Gm-Gg: ASbGnctt/TDGWmWtob5MgJVC2ACtdL8lmb31GQYcTOqXED33neF5XmvN3iPCTgWEL9E zYghBJHZG9+vALrZvvklBNpf/BDVMaIP5KfYXN0GKldd6uUdWEgVjNHixGwzLIKa+MH7CoDgdhO vd8N7qJ3nwZZfnJnC3vMv5Qux18by3XHYxHok4R2bmrGJVprBPrPjDMN1r/TilyB4vurAVz6Oy8 faN76NhlUZMuOi6VQPv11q6aYq7SbhESkcu1nQIRg9zwaovM1654vg6vf6uzGVlobUbYrlNMdkB 3XtVo+i6GPPsEg6La3EZ87QW0M6+stAXeuoLRnsYQaeY+08s1SYtPecI4Xhtoy/JVi5mY5TTztx +LyalqUrV23kETSY0GEqzzTIE X-Google-Smtp-Source: AGHT+IHMq2iRQ4JJ/3DdLT3pRZNEViJY6EFYl1Qv3LlYgp9Uiwg3wb8Xk5JnMKZ+mkUPqjr2M263rw== X-Received: by 2002:a05:690c:4091:b0:6fe:c007:3b20 with SMTP id 00721157ae682-6fec0073cedmr265800427b3.2.1741871686967; Thu, 13 Mar 2025 06:14:46 -0700 (PDT) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6ff32840d76sm3187367b3.25.2025.03.13.06.14.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Mar 2025 06:14:46 -0700 (PDT) Message-ID: <330ca171-623a-44ab-91a0-7dbf7520fb83@joeconway.com> Date: Thu, 13 Mar 2025 09:14:46 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Moving from Linux to Linux? To: Paul Foerster Cc: Adrian Klaver , Pgsql-General List References: <6E6059F6-E5A1-4A8D-8A5E-A41B921BBE67@gmail.com> <9a8d92de-228c-43b0-b66c-c3390b41044a@aklaver.com> <6C78D9E9-2EC3-4FBF-AC22-268DCE8F6A91@gmail.com> Content-Language: en-US From: Joe Conway Autocrypt: addr=mail@joeconway.com; keydata= xsFNBEpXM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LNdT/ftgliAzA 81uMj49j0exv731/v+7udLA1bV8gnZ01zQCASDpWiRQR3fgwcugSUqgRABEBAAHCwV8EGAEI AAkFAkpXMicCGwwACgkQMyt+aLaZQ0pwAQ//bjcWnZg/jjRQ9gbZUGMqniItZYRglBMKIqt4 Fia379JmHwTvavnFkJ8XMZ56UB0FIrgS+sUkRH6cPRQR+7Qi392LD021DXgSsz9CwFHjFyBG HwLEOTRcfYQbtJy0shHDJB4aQTOX3ERDH1PsvJNuevmQMzS0DWFav9+xMz9rKP4N+HffoBIZ E0C1xIE43nD4eLsbycte9sVIrmlNuUti3qUxJAQw8HwfJ6ZbBInHxquApR16uD1u99o6Xlnd FrDlY22tRmHCM0bR81GfGNdcU3Uo+rG/R/k4qa7s9/dgKvMbyH3fHhp/ceKag80Xo8IFurRl 0ZJP3sHJ2QDHCVLat7jRZ+43hi1WlIhFbrgn6IyI0i7XR/W8JjrC5MsKq4TUwGH077sU/kcH YebVJZRbUUst2hAGHDFVBcG12qoKf+ltL9qXJc1y7BGeCoUW6QjOpljpq6ZL4FQUsM0RSRjs 5egE3szPcIf5SyPK6WDOApoAq6M7BBFMGDZwEylYMtr0YekA1u86UA9D2xwLHEbBBp/uiby1 c9JbPJ1Pn8zJP8WZNeRw4Q9TtqVK09+oLirMUSpIDd6KdZ1VgRxOK2re7tjDvkVuYsSrsiJ+ 1iJNEnp9iK0ok0DlJpSCe6KhkxpaTdeoWMXdKuJWec0NIqoAd54ZgBPnr+UPxTixgPq/p6Q= In-Reply-To: <6C78D9E9-2EC3-4FBF-AC22-268DCE8F6A91@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/13/25 06:10, Paul Foerster wrote: >> The other option, which may be equally untenable, is to upgrade in- >> place to pg17 and convert everything to use the new built-in >> collation provider. That ought to be portable across different >> versions of Linux. > Is C.UTF8 really the same as en_US.UTF8? I ask because though we use > en_US.UTF8, we are located in Switzerland and using non English > characters is not exactly the exception. We have characters from all > over the world in our databases. There must be no sorting > differences between en_US.UTF8 and C.UTF8. Otherwise we will run > into trouble with unhappy customers. So, C.UTF8 would only be an > option if the collation would be identical. Definitely not exactly the same. It does handle all the same characters (UTF8). How often do you really depend on the ordering to the client being exactly what the end user wants to see? Often the final ordering is done in the application. Or could be done. You can also use a COLLATE clause to get exactly the ordering you want when you need it. The builtin collation has two big advantages -- 1) it should be stable and portable, and 2) it should perform substantially faster (in simple tests I have seen 10X speed ups). >> The problem you might find with libicu is that different versions >> of ICU can have the same issues as different versions of glibc, >> and you might not have the same ICU version available on SLES and >> RHEL. > Yes, I know. As far as I have been told, libicu is far less prone to > major collation changes than glibc is. Less prone, yes, but still it happens. And when it happens you can get corruption of your index, which can lead to things like duplicate primary/unique keys and data going to the wrong partition to cite two examples. > Also, libicu offers the possibility to pin a version for a certain > time. Our sysadmins will naturally not be able to pin a glibc > version without wrecking an inevitable server upgrade. Yes, in theory libicu can be pinned more easily than glibc, for sure. The reality is that you would either need your Linux distro to provide that pinned version as you upgrade, which I don't think any of them do (or in the case of SUSE to RHEL they would have to match from the get go), or you would have to take on maintaining your own pinned version going forward. That latter option is essentially the same as the glibc compatibility library approach though, so perhaps not horrible. >> If you want to explore the compatibility library approach contact >> me off list and I will try to get you started. It has been a >> couple of years since I touched it, but when I did it took me a >> couple of days to get from the AL2 (glibc 2.26) branch (which was >> done first) to the RHEL 7 (glibc 2.17) branch. > I just took a quick glance. I don't have a Github account (and also > don't want one 🤣). I can do a git clone, but that's basically all I > know. Also, right now, I'm just exploring possibilities. As far as I > understand the readme on Github, this will replace the glibc on Red > Had with one with adapted collation rules? If this is the case, then > our admins will definitely say no to this. No, it does not replace glibc. It extracts just the locale functionality from glibc into its own portable library, pretty much like libicu. Then you can link against it. So for example you wind up with "glibc 2.26 locale semantics" with Postgres on your Linux distro which has glibc 2.34 installed. All of the non-locale functionality comes from the system glibc 2.34. >> [1] https://www.joeconway.com/presentations/2025-PGConf.IN-glibc.pdf > This is a really good one. Thanks very much for this. You should probably watch this presentation in its entirety: https://www.youtube.com/watch?v=KTA6oau7tl8 Jeremy does a really good job of dispelling misconceptions and if I remember correctly Jeff Davis talks about the builtin provider. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com