Reputation: 63
I'm trying to replicate postgresql 10 as master server in ubuntu 18.04 LTS to postgresql 9.5 slave server in ubuntu 16.04 but got the error
postgres@localhost:/root$ pg_basebackup -h 139.162.4.197 -U replication -p 5432 -D /var/lib/postgresql/9.5/main/ -Fp -Xs -P -R
could not change directory to "/root": Permission denied
Password:
pg_basebackup: incompatible server version 10.16 (Ubuntu 10.16-1.pgdg18.04+1)
but when done with same postgresql versions like
it replicates fine
but when done with different postgresql version like
I got the above error
pg_basebackup: incompatible server version 10.16 (Ubuntu 10.16-1.pgdg18.04+1)
any clues to resolve the issue
Upvotes: 1
Views: 1818
Reputation: 246013
This is not possible with streaming replication; the horse's comment quotes the documentation:
In general, log shipping between servers running different major PostgreSQL release levels is not possible.
But from PostgreSQL v10 on you could use logical replication, which also works between major releases. The problem with that is that not everything is replicated: DDL statements are not.
Upvotes: 1