Обсуждение: [ADMIN] Questions on Streaming Replication

Поиск
Список
Период
Сортировка

[ADMIN] Questions on Streaming Replication

От
Wei Shan
Дата:
Hi all!

Is it possible setup streaming replication between different OS?

For example, between RHEL6 and RHEL7. I understand that it is not possible between Windows and Linux.I need to migrate a PostgreSQL instance to a new host, while upgrading the OS if possible.

Has anyone done this before?

Thanks in advance!

--
Regards,
Ang Wei Shan

Re: [ADMIN] Questions on Streaming Replication

От
Ashish Tiwari
Дата:
Hi Shan,

I haven't used streaming replication to work between different OS.but Slony -I support this kind of requirements.it is easy to setup .
It provide trigger based replication.
For your upgradation activity you can use this after upgradation you can switch to streaming replication.This is as workaround .

Thanks.


On Jul 6, 2017 5:00 AM, "Wei Shan" <weishan.ang@gmail.com> wrote:
Hi all!

Is it possible setup streaming replication between different OS?

For example, between RHEL6 and RHEL7. I understand that it is not possible between Windows and Linux.I need to migrate a PostgreSQL instance to a new host, while upgrading the OS if possible.

Has anyone done this before?

Thanks in advance!

--
Regards,
Ang Wei Shan

Re: [ADMIN] Questions on Streaming Replication

От
Om Prakash Jaiswal
Дата:
Replication is possible between two OS.
You can use BUCARDO Asynchronous replication system. Which follow TCP/IP standard protocol,
It does not matter which  OS you are using. Only nature and signature(Table name and data type) should match.

It may be some other tools like slony, rubyrep  also work. Because they also use TCP/IP protocol.
Although Bucardo I have used across two operating system RHEL 6(32bit) and RHEL7(64bit). It is working.

Regards
Om Prakash
DBA, Bangalore
Mob: 9035635787


On Thursday, 6 July 2017 5:01 AM, Wei Shan <weishan.ang@gmail.com> wrote:


Hi all!

Is it possible setup streaming replication between different OS?

For example, between RHEL6 and RHEL7. I understand that it is not possible between Windows and Linux.I need to migrate a PostgreSQL instance to a new host, while upgrading the OS if possible.

Has anyone done this before?

Thanks in advance!

--
Regards,
Ang Wei Shan


Re: [ADMIN] Questions on Streaming Replication

От
Scott Marlowe
Дата:
On Wed, Jul 5, 2017 at 9:03 PM, Om Prakash Jaiswal <op12om@yahoo.co.in> wrote:
> Replication is possible between two OS.
> You can use BUCARDO Asynchronous replication system. Which follow TCP/IP
> standard protocol,
> It does not matter which  OS you are using. Only nature and signature(Table
> name and data type) should match.
>
> It may be some other tools like slony, rubyrep  also work. Because they also
> use TCP/IP protocol.
> Although Bucardo I have used across two operating system RHEL 6(32bit) and
> RHEL7(64bit). It is working.
>
> Regards
> Om Prakash
> DBA, Bangalore
> Mob: 9035635787
>
>
> On Thursday, 6 July 2017 5:01 AM, Wei Shan <weishan.ang@gmail.com> wrote:
>
>
> Hi all!
>
> Is it possible setup streaming replication between different OS?
>
> For example, between RHEL6 and RHEL7. I understand that it is not possible
> between Windows and Linux.I need to migrate a PostgreSQL instance to a new
> host, while upgrading the OS if possible.
>
> Has anyone done this before?

They key here is that your postgresql's need to agree on things like
date format etc and be in teh same binary format.

I do know that with linux they don't have to have the same OS
underneath them. Just the same basic postgresql version.

Not sure on windows to linux though. Never done that.


Re: [ADMIN] Questions on Streaming Replication

От
Mark Kirkwood
Дата:
I think you should be ok between different versions of Linux, provided:

- both systems use hardware with same endianness and bitness (e.g both
64 bit Intel say)

- both OS are the same bitness (e.g both 64 bit)

regards

Mark


On 06/07/17 11:29, Wei Shan wrote:
> Hi all!
>
> Is it possible setup streaming replication between different OS?
>
> For example, between RHEL6 and RHEL7. I understand that it is not
> possible between Windows and Linux.I need to migrate a PostgreSQL
> instance to a new host, while upgrading the OS if possible.
>
> Has anyone done this before?
>
> Thanks in advance!
>
> --
> Regards,
> Ang Wei Shan



Re: [ADMIN] Questions on Streaming Replication

От
Wei Shan
Дата:
Thanks guys. I just wanted to know if SR between RHEL6 and RHEL7 as I didn't want to test it out myself.

Cheers!

On 6 Jul 2017 06:50, "Mark Kirkwood" <mark.kirkwood@catalyst.net.nz> wrote:
I think you should be ok between different versions of Linux, provided:

- both systems use hardware with same endianness and bitness (e.g both 64 bit Intel say)

- both OS are the same bitness (e.g both 64 bit)

regards

Mark


On 06/07/17 11:29, Wei Shan wrote:
Hi all!

Is it possible setup streaming replication between different OS?

For example, between RHEL6 and RHEL7. I understand that it is not possible between Windows and Linux.I need to migrate a PostgreSQL instance to a new host, while upgrading the OS if possible.

Has anyone done this before?

Thanks in advance!

--
Regards,
Ang Wei Shan

Re: [ADMIN] Questions on Streaming Replication

От
Albe Laurenz
Дата:
> On 06/07/17 11:29, Wei Shan wrote:
>> Is it possible setup streaming replication between different OS?
>>
>> For example, between RHEL6 and RHEL7. I understand that it is not
>> possible between Windows and Linux.I need to migrate a PostgreSQL
>> instance to a new host, while upgrading the OS if possible.
>>
>> Has anyone done this before?

Mark Kirkwood wrote:
> I think you should be ok between different versions of Linux, provided:
> 
> - both systems use hardware with same endianness and bitness (e.g both
> 64 bit Intel say)
> 
> - both OS are the same bitness (e.g both 64 bit)

And, very importeant, if they don't have different versions of libc
that have different ideas about character collation.
See also https://www.postgresql.org/message-id/CB4D1C6BAA80CF146CB0D4F2%40eje.credativ.lan

RHEL6:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.9 (Santiago)
$ echo -e '156\n1-5-6\n110\n1-1-0' | LANG=de_DE.UTF-8 sort
1-1-0
110
1-5-6
156

RHEL7:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
$ echo -e '156\n1-5-6\n110\n1-1-0' | LANG=de_DE.UTF-8 sort
110
1-1-0
156
1-5-6

So you are probably OK as long as you are only using the C collation, but
if you have any indexes that use a collation that is different on both systems,
The index on the standby will be corrupted.

Yours,
Laurenz Albe

Re: [ADMIN] Questions on Streaming Replication

От
Wei Shan
Дата:
Hi Laurenz,

But the same version of glibc will be different on RHEL6/RHEL7 isn't it?


On 7 July 2017 at 12:11, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
> On 06/07/17 11:29, Wei Shan wrote:
>> Is it possible setup streaming replication between different OS?
>>
>> For example, between RHEL6 and RHEL7. I understand that it is not
>> possible between Windows and Linux.I need to migrate a PostgreSQL
>> instance to a new host, while upgrading the OS if possible.
>>
>> Has anyone done this before?

Mark Kirkwood wrote:
> I think you should be ok between different versions of Linux, provided:
>
> - both systems use hardware with same endianness and bitness (e.g both
> 64 bit Intel say)
>
> - both OS are the same bitness (e.g both 64 bit)

And, very importeant, if they don't have different versions of libc
that have different ideas about character collation.
See also https://www.postgresql.org/message-id/CB4D1C6BAA80CF146CB0D4F2%40eje.credativ.lan

RHEL6:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.9 (Santiago)
$ echo -e '156\n1-5-6\n110\n1-1-0' | LANG=de_DE.UTF-8 sort
1-1-0
110
1-5-6
156

RHEL7:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
$ echo -e '156\n1-5-6\n110\n1-1-0' | LANG=de_DE.UTF-8 sort
110
1-1-0
156
1-5-6

So you are probably OK as long as you are only using the C collation, but
if you have any indexes that use a collation that is different on both systems,
The index on the standby will be corrupted.

Yours,
Laurenz Albe



--
Regards,
Ang Wei Shan

Re: [ADMIN] Questions on Streaming Replication

От
Albe Laurenz
Дата:
Wei Shan wrote:
> But the same version of glibc will be different on RHEL6/RHEL7 isn't it?
> 
> Look here: http://distrowatch.com/table.php?distribution=redhat

I don't understand.

RHEL6 has glibc 2.12, RHEL 7 has 2.17.

As I showed, at least the German collations for these versions are different.

PostgreSQL uses the operating system's collations.

So indexes using the same collation can be sorted differently on RHEL6 and RHEL7.

Yours,
Laurenz Albe