pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Streaming replication between different OS
Date: Mon, 22 Feb 2021 17:22:10 +0100
Message-ID: <20210222162210.GA11624@hjp.at> (raw)
In-Reply-To: <3583406.1614008216@sss.pgh.pa.us>
References: <CA+ONtZ77E9E3Em271xi9Kj+n1AGQR-+TOSMTgrEjR0vNb_pO9A@mail.gmail.com>
	<CAPNyb0W6G0q3aSREVLZHjP=Z8vV9JDTU8qvF2Ps_zWGPCvn+Hg@mail.gmail.com>
	<3583406.1614008216@sss.pgh.pa.us>

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@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (6+ messages)  latest in thread

Message-ID: <20210222162210.GA11624@hjp.at>
Permalink:  ../20210222162210.GA11624@hjp.at/
Also on:    postgresql.org/message-id/20210222162210.GA11624@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: Streaming replication between different OS
  In-Reply-To: <20210222162210.GA11624@hjp.at>
  References: <CA+ONtZ77E9E3Em271xi9Kj+n1AGQR-+TOSMTgrEjR0vNb_pO9A@mail.gmail.com> <CAPNyb0W6G0q3aSREVLZHjP=Z8vV9JDTU8qvF2Ps_zWGPCvn+Hg@mail.gmail.com> <3583406.1614008216@sss.pgh.pa.us> <20210222162210.GA11624@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox