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 1lEDyb-0008Mp-Ez for pgsql-general@arkaria.postgresql.org; Mon, 22 Feb 2021 16:22:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lEDya-0002eW-2Y for pgsql-general@arkaria.postgresql.org; Mon, 22 Feb 2021 16:22:24 +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 1lEDyZ-0002df-Qu for pgsql-general@lists.postgresql.org; Mon, 22 Feb 2021 16:22:23 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEDyQ-000384-45 for pgsql-general@lists.postgresql.org; Mon, 22 Feb 2021 16:22:22 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id BC8F04530; Mon, 22 Feb 2021 17:22:10 +0100 (CET) Date: Mon, 22 Feb 2021 17:22:10 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Streaming replication between different OS Message-ID: <20210222162210.GA11624@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <3583406.1614008216@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline In-Reply-To: <3583406.1614008216@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-02-22 10:36:56 -0500, Tom Lane wrote: > The other thing you have to worry about is whether the collations you > use sort the same on both systems ... if they don't, you'll have > effectively-corrupt indexes on text columns on the standby. >=20 > According to >=20 > https://wiki.postgresql.org/wiki/Locale_data_changes >=20 > you should be okay for rhel/centos 6 to 7 migration unless you > use de_DE locale. But I don't know how thorughly that's been > checked. I wrote this little script: https://git.hjp.at:3000/hjp/pgcollate/src/branch/master/pgcollate It just creates a table with every valid Unicode codepoint (and a few short strings) and dumps it in sorted order. The idea is that you run it and both systems (or before and after an upgrade) and compare the outputs. If they differ, text indexes are probably broken. Note that it only checks the sort order of single codepoints thoroughly, not that of longer strings. So even if the output is the same, the collation may still be different. Since the number of possible combinations is essentially infinite, a systematic check is impossible. I would be happy to add additional strings, though, Especially if they are known to cause trouble. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmAz2i0ACgkQ8g5IURL+ KF2wZQ//XZOeKbqEscxiEzUqmm+JLFv3COlqMbWBfZSCC1zlahu8vNeLQGMJrgLg TrA16fL1RYTEVaQiQ0jwSGpbzWV++0lRp3YX4OpNvtBUQQbJmrg3duu6qJ/HCdWG ESdz6TcMqukmzIkjO/XuyjXuN6/9FvcukLU1/I6pPRLlr0ffqleMVDdrwjet4CXp IYix+UQ1EKTxRNLh4ESOu4qqRksULt7uTi9OvInacTJubTbnz8LOognGwa5knJs0 1IN8XL/n7mtB+9X1Mnvmfe+MK62pOijdNQWHEEbD0fF9gMLl1rY24wWyBrsSqslP bTljAEevws/G0s9d2a+XbOnPuKhVpBNT/cbNf+d8Pxl4beXM72uFJr8/X45AnZ4o U5Z45l34qqyTFe0nJKL4DZHzZIS4OkDuRDECv/r0oADcNoGOyAhm2oztXsxnvvli yuKEF3wCGOsGjRhB4OG/kRcFFI+cXlH5o+hkrKMvrzLIbGOyz4CrUWttP7+vpHFT WG/yzYGWaQjDjfmstbcgRNDkxFoZ0S1tOQAt7REaH+MkJoAy1miFQZKfTaTMFhoY lC9f6kDrV6o2XABKnppEdsbvHeb1pWR0B4ejLrkebAW5nzaFOD9NehdEHN5m0YVS gAwoLIi141BGWFcMyhZfA0EUWvZl7p+VYC+YHTZ06v6MBfLFj2U= =d3WP -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--