Locale is incompatible error in Postgresql 10 when replicating from Ubunu to Win 10 The locale available in my Ubuntu PG-10 DB is en_US.UTF-8. When doing PG_Basebackup to a PG-10 DB in Win-10, Psql failed to connect with error


  psql: FATAL:  database locale is incompatible with operating system
  DETAIL:  The database was initialized with LC_COLLATE "en_US.UTF-8", 
  which is not recognized by setlocale(). HINT:  Recreate the database
  with another locale or install the missing locale.


The locale available in Win10 are 

                          List of databases
   Name    | Owner      | Encoding | Collate | Ctype | 
-----------+------------+----------+---------+-------+-
 postgres  | postgres   | UTF8     | en-US   | en-US |



                                           List of databases
   Name    | Owner    | Encoding |          Collate           |           Ctype            | 
-----------+----------+----------+----------------------------+----------------------------+
 postgres  | postgres | UTF8     | English_United States.1252 | English_United States.1252 |


But the above locale are not taking when doing the Basebackup. Any fix for this issue.
You can't copy a data directory (which is what pg_basebackup does) between two different operating systems. The missing locale is just one symptom. If you need to replicate between Linux and Windows use logical replication – a_horse_with_no_name