Currently I am doing some Research on how to set up streaming replication for a HA postgresql architecture. But this issue is also relevant for us for backup/restore and maintenance in mixed environments in general.
Our "main" postgresql server is running on a Windows box. I am using pg_dump to create logical backups every day and pg_basebackup and WAL archiving to create a full backup which should provide PITR (I have not tested this yet).
Next step is to set up a slave machine which holds a replica via streaming replication. Due to the better Support of the postgresql ecosystem, this new host is running Ubuntu Server 16.04 LTS.
pg_basebackup -h <main host> -D <datadirectory> --xlog-method=stream
I initialized the slave datadirectory. standby_mode = on
and the connectioninfohot_standby = on
and started the daemonNow I am running into issues as postgres tells me, that the "database locale (English_United_States.1252 which is obviously Windows specific) is incompatible with operating System"
Well, I am aware, that 1252 is a Windows specific locale and that I should use en_US.UTF8 on Linux, BUT in a mixed Environment like this, should I:
You cannot restore file system backups like the one that pg_basebackup
creates on a different architecture, like restore a backup from Windows on Linux.
It is also impossible to have streaming repication in such a scenario.
From PostgreSQL v10 on, you might consider logical replication.