Re: 13.x, stream replication and locale(?) issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 13.x, stream replication and locale(?) issues
Дата
Msg-id 744349.1677597715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 13.x, stream replication and locale(?) issues  ("Eugene M. Zheganin" <eugene@zhegan.in>)
Список pgsql-general
"Eugene M. Zheganin" <eugene@zhegan.in> writes:
> I have a 13.4 pgsql instance on Linux which has a bunch of databases 
> with UTF-8/ru_RU.utf8 encoding/collation set.

> I've stream replicated it to the 13.10 instance on FreeBSD (may be this 
> is the part where it all has gone wrong way, but at this moment I 
> believe streaming replication should work since both run one major 
> version). And the funny things started to happen.

Sadly, ru_RU.utf8 on Linux and ru_RU.utf8 on FreeBSD are almost
certainly *not* exactly compatible.  You could probably ignore the
differences if you were using logical replication, but with physical
replication any difference in sort order is going to mean that indexes
on text columns appear corrupt on the standby.  Which is exactly what
your troubles sound like.

You could verify this theory by seeing whether contrib/amcheck reports
any ordering problems in the indexes of the troublesome tables.
(You'll probably have to promote the standby to primary in order to
install the amcheck extension, but you need to treat that installation
as hosed anyway ...)

There's more info about this general class of problems at

https://wiki.postgresql.org/wiki/Locale_data_changes

although that focuses on the even-more-annoying case where locale
sort order changes between releases of a single OS.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: celati Laurent
Дата:
Сообщение: Move all elements toward another schema?
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: Quit currently running query