Convert from LATIN9 to UTF-8 / WAL Replication

Started by bastialmost 9 years ago3 messagesgeneral
Jump to latest
#1basti
mailinglist@unix-solution.de

Hello,

I must convert a Latin9 Pg-cluster (Version 9.1) in utf-8 with minimal
downtime, if possible.
My idea is to use WAL replication for that.
Is it usable for that or in other words, can WAL Replication handle
different encoding on master/slave?
Is there perhaps an other way to do that?
Is it possible to use on Master Version 9.1 and on Slave 9.6 (it will
get the new master in the next step)?

Best Regards,
Basti

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: basti (#1)
Re: Convert from LATIN9 to UTF-8 / WAL Replication

Em ter, 9 de mai de 2017 às 17:40, basti <mailinglist@unix-solution.de>
escreveu:

Hello,

I must convert a Latin9 Pg-cluster (Version 9.1) in utf-8 with minimal
downtime, if possible.
My idea is to use WAL replication for that.
Is it usable for that or in other words, can WAL Replication handle
different encoding on master/slave?

Short answer: no!

Is there perhaps an other way to do that?

I never tried it, but you can use some logical replication tool like Slony.

Is it possible to use on Master Version 9.1 and on Slave 9.6 (it will

get the new master in the next step)?

Unfortunately no because on 9.1 version we don't have support for logical
replication yet. We start supporting it since 9.4 using pglogical
extension. As I said before you should consider use one external
replication tool like Slony to do this job.

Regards,

--
Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

#3Magnus Hagander
magnus@hagander.net
In reply to: Fabrízio de Royes Mello (#2)
Re: Convert from LATIN9 to UTF-8 / WAL Replication

On Wed, May 10, 2017 at 5:05 AM, Fabrízio de Royes Mello <
fabrizio@timbira.com.br> wrote:

Em ter, 9 de mai de 2017 às 17:40, basti <mailinglist@unix-solution.de>
escreveu:

Hello,

I must convert a Latin9 Pg-cluster (Version 9.1) in utf-8 with minimal
downtime, if possible.
My idea is to use WAL replication for that.
Is it usable for that or in other words, can WAL Replication handle
different encoding on master/slave?

Short answer: no!

Is there perhaps an other way to do that?

I never tried it, but you can use some logical replication tool like Slony.

Is it possible to use on Master Version 9.1 and on Slave 9.6 (it will

get the new master in the next step)?

Unfortunately no because on 9.1 version we don't have support for logical
replication yet. We start supporting it since 9.4 using pglogical
extension. As I said before you should consider use one external
replication tool like Slony to do this job.

In a scenario like this it might also be worth upgrading to 9.6 using
pg_upgrade while maintaining the latin9 encoding, and then do a second
migratino which changes the encoding from 9.6 w latin9 to 9.6 w utf8. That
way you can get access to the newer tools such as pglogical to help you do
that.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;