Re: pg_upgrade problem as locale difference in data centers

2021-09-26 Thread Yi Sun
Hi Tom, Thank you for your help. As we use ansible to deploy the upgrade, so mentioned the data centers situation. The PostgreSQL is single node and the upgrade will be in the same data center and same Linux server(Centos 7), just will run the ansible to upgrade PG in all Data centers. For

Re: pg_upgrade problem as locale difference in data centers

2021-09-20 Thread Yi Sun
As we use ansible to deploy the upgrade, so mentioned the data centers situation. The PostgreSQL is single node and the upgrade will be in the same data center and same Linux server(Centos 7), just will run the ansible to upgrade PG in all Data centers. For example, in our aaa data center

Re: pg_upgrade problem as locale difference in data centers

2021-09-17 Thread Tom Lane
Yi Sun writes: > update pg_database set datcollate='en_US.UTF-8', datctype='en_US.UTF-8' > where datname in ('postgres','template1','template0') and > (datcollate<>'en_US.UTF-8' or datctype<>'en_US.UTF-8') This seems like a pretty bad idea. You might get away with it if you've not added any

pg_upgrade problem as locale difference in data centers

2021-09-16 Thread Yi Sun
Hello, We want to upgrade some PG9.6 DB to PG13, the databases locale are different in data centers, some are C, some are ru_RU.UTF-8 and so on... as below postgres=# select datname,datcollate,datctype from pg_database; datname| datcollate | datctype