Search Postgresql Archives

Re: Streaming replication between different OS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> 
> According to
> 
> https://wiki.postgresql.org/wiki/Locale_data_changes
> 
> 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

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@xxxxxx         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux