Обсуждение: Replicating from 9.1.10 into 9.3.5

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

Replicating from 9.1.10 into 9.3.5

От
Rob Cowell
Дата:
Hi,

Is it possible to set up replication from a 9.1.10 master to  a 9.3.5 slave?
I've taken a base-backup from the master and rsync'd it over to the slave but I'm seeing the following error :

   HINT:  It looks like you need to initdb.
   FATAL:  database files are incompatible with server
   DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 903, but the server was compiled with
PG_CONTROL_VERSION937. 

Would I be better off dumping the data from 9.1.10 and re-importing into 9.3.5, then starting replication ?
(or is there an easier way?) :)

Cheers,
Rob.

Re: Replicating from 9.1.10 into 9.3.5

От
David G Johnston
Дата:
Rob Cowell wrote
> Hi,
>
> Is it possible to set up replication from a 9.1.10 master to  a 9.3.5
> slave?
> I've taken a base-backup from the master and rsync'd it over to the slave
> but I'm seeing the following error :
>
>    HINT:  It looks like you need to initdb.
>    FATAL:  database files are incompatible with server
>    DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION
> 903, but the server was compiled with PG_CONTROL_VERSION 937.
>
> Would I be better off dumping the data from 9.1.10 and re-importing into
> 9.3.5, then starting replication ?
> (or is there an easier way?) :)
>
> Cheers,
> Rob.

If you mean ongoing streaming replication then, as indicated from the error
message you are getting, no, you cannot mix server versions.

Only logical replication can do that; which, for you, would be a third-party
solution.

David J.



--
View this message in context: http://postgresql.nabble.com/Replicating-from-9-1-10-into-9-3-5-tp5833423p5833424.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: Replicating from 9.1.10 into 9.3.5

От
Steve Crawford
Дата:
On 01/09/2015 09:17 AM, Rob Cowell wrote:
> Hi,
>
> Is it possible to set up replication from a 9.1.10 master to  a 9.3.5 slave?
For streaming log-based replication the answer is no:
>     FATAL:  database files are incompatible with server
>     DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 903, but the server was compiled with
PG_CONTROL_VERSION937. 
>
> Would I be better off dumping the data from 9.1.10 and re-importing into 9.3.5, then starting replication ?
> (or is there an easier way?) :)
There are lots of options. IIRC, Slony can be used for cross-version
replication. Pg_upgrade can be used instead of a dump and restore. Which
is easiest depends on your operational constraints.

Of all the methods, "old-reliable" is a dump and restore. Set up
replication after that. Be sure to use pg_dump from the *new* version to
take the dump from the old database. And if you are going through the
effort to upgrade, consider 9.4.0 at this point.

There is work to support statement-based replication which will probably
support replication-based upgrades in the future. But not from your version.

Cheers,
Steve



Re: Replicating from 9.1.10 into 9.3.5

От
Venkata Ramana
Дата:

Hi rob,

It is not possible to take streaming replication between two major versions as by taking basebackup all the data directory of lower is copied which are not changed in this case version is not changed.

You may better go with slony replication in which replication between two different major versions can be taken efficiently for which you have to take dump of empty schema and then restore it the other version of postgresql and then run scripts to setup replication between postgresql 9.1.10 master and postgresql 9.3.5 slave.

Thanks & Regards
Venkataramana Aitla
Shreeyansh Technologies
www.shreeyansh.com

On Jan 9, 2015 10:48 PM, "Rob Cowell" <rob.cowell@transversal.com> wrote:

Hi,

Is it possible to set up replication from a 9.1.10 master to  a 9.3.5 slave?
I've taken a base-backup from the master and rsync'd it over to the slave but I'm seeing the following error :

   HINT:  It looks like you need to initdb.
   FATAL:  database files are incompatible with server
   DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 903, but the server was compiled with PG_CONTROL_VERSION 937.

Would I be better off dumping the data from 9.1.10 and re-importing into 9.3.5, then starting replication ?
(or is there an easier way?) :)

Cheers,
Rob.

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

Re: Replicating from 9.1.10 into 9.3.5

От
Harshad Adalkonda
Дата:

On Fri, Jan 9, 2015 at 10:47 PM, Rob Cowell <rob.cowell@transversal.com> wrote:

Hi,

Is it possible to set up replication from a 9.1.10 master to  a 9.3.5 slave?
I've taken a base-backup from the master and rsync'd it over to the slave but I'm seeing the following error :

   HINT:  It looks like you need to initdb.
   FATAL:  database files are incompatible with server
   DETAIL:  The database cluster was initialized with PG_CONTROL_VERSION 903, but the server was compiled with PG_CONTROL_VERSION 937.

Would I be better off dumping the data from 9.1.10 and re-importing into 9.3.5, then starting replication ?
(or is there an easier way?) :)

Cheers,
Rob.

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

Hi Rob Cowell,

In PostgreSQL Streaming Replication can't be set in major versions, it is only possible in same version or minor version.

If you want to set up Replication in 2 major versions it can be done through Slony Replication, Londiste Replication.

Else you need to upgrade from 9.1 to 9.3 using

pg_dump & pg_restore - (easier way) but it will take more time if database size is huge.
pg_upgrade - less time but require more disk-space.
Slony replication - trigger based replication.
Londiste replication - trigger based replication but documentation is not that much clear.

--
Thanks & Regards,
Harshad Adalkonda
Database Administrator
www.shreeyansh.com