Streaming replication between different OS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Streaming replication between different OS

Atul Kumar-2
Hi,


I have postgres 9.6 cluster running on Centos 6.8, so I just wanted to know that can I configure streaming replication with same postgres version i.e 9.6 running on centos 7.

Suggestions are welcome as the Centos versions are different one is 6.8 and second one is 7.

Also please let me know if there will be any challenge in case of failover.
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication between different OS

ganeshakorde
Should not be a problem if both OS archtecture (32 bit/ 64 bit) are same.

On Mon, 22 Feb 2021, 11:48 am Atul Kumar, <[hidden email]> wrote:
Hi,


I have postgres 9.6 cluster running on Centos 6.8, so I just wanted to know that can I configure streaming replication with same postgres version i.e 9.6 running on centos 7.

Suggestions are welcome as the Centos versions are different one is 6.8 and second one is 7.

Also please let me know if there will be any challenge in case of failover.
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication between different OS

Tom Lane-2
Ganesh Korde <[hidden email]> writes:
> On Mon, 22 Feb 2021, 11:48 am Atul Kumar, <[hidden email]> wrote:
>> I have postgres 9.6 cluster running on Centos 6.8, so I just wanted to
>> know that can I configure streaming replication with same postgres version
>> i.e 9.6 running on centos 7.

> Should not be a problem if both OS archtecture (32 bit/ 64 bit) are same.

The other thing you have to worry about is whether the collations you
use sort the same on both systems ... if they don't, you'll have
effectively-corrupt indexes on text columns on the standby.

According to

https://wiki.postgresql.org/wiki/Locale_data_changes

you should be okay for rhel/centos 6 to 7 migration unless you
use de_DE locale.  But I don't know how thorughly that's been
checked.

Using logical not physical replication might be safer.

                        regards, tom lane


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication between different OS

Peter J. Holzer
On 2021-02-22 10:36:56 -0500, Tom Lane wrote:

> The other thing you have to worry about is whether the collations you
> use sort the same on both systems ... if they don't, you'll have
> effectively-corrupt indexes on text columns on the standby.
>
> According to
>
> https://wiki.postgresql.org/wiki/Locale_data_changes
>
> you should be okay for rhel/centos 6 to 7 migration unless you
> use de_DE locale.  But I don't know how thorughly that's been
> checked.
I wrote this little script:
https://git.hjp.at:3000/hjp/pgcollate/src/branch/master/pgcollate

It just creates a table with every valid Unicode codepoint (and a few
short strings) and dumps it in sorted order. The idea is that you run it
and both systems (or before and after an upgrade) and compare the
outputs. If they differ, text indexes are probably broken.

Note that it only checks the sort order of single codepoints thoroughly,
not that of longer strings. So even if the output is the same, the
collation may still be different. Since the number of possible
combinations is essentially infinite, a systematic check is impossible.
I would be happy to add additional strings, though, Especially if they
are known to cause trouble.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [hidden email]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication between different OS

Atul Kumar-2
In reply to this post by Tom Lane-2
Hi Tom,

As I am new to postgres, could you help me to in how to check collation and what is de_DE locale ?


Regards 






On Monday, February 22, 2021, Tom Lane <[hidden email]> wrote:
Ganesh Korde <[hidden email]> writes:
> On Mon, 22 Feb 2021, 11:48 am Atul Kumar, <[hidden email]> wrote:
>> I have postgres 9.6 cluster running on Centos 6.8, so I just wanted to
>> know that can I configure streaming replication with same postgres version
>> i.e 9.6 running on centos 7.

> Should not be a problem if both OS archtecture (32 bit/ 64 bit) are same.

The other thing you have to worry about is whether the collations you
use sort the same on both systems ... if they don't, you'll have
effectively-corrupt indexes on text columns on the standby.

According to

https://wiki.postgresql.org/wiki/Locale_data_changes

you should be okay for rhel/centos 6 to 7 migration unless you
use de_DE locale.  But I don't know how thorughly that's been
checked.

Using logical not physical replication might be safer.

                        regards, tom lane
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication between different OS

Peter J. Holzer
On 2021-02-22 23:02:12 +0530, Atul Kumar wrote:
> As I am new to postgres, could you help me to in how to check collation

show LC_COLLATE;

> and what is de_DE locale ?

The locale (i.e. language specific rules (sorting, formatting of
numbers, dates, etc.) for German ("de") as spoken in Germany ("DE").

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [hidden email]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

signature.asc (849 bytes) Download Attachment