PostgreSQL mirroring from RPM install to Source install

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

PostgreSQL mirroring from RPM install to Source install

Richard Brosnahan
Good day to you!

I've got a PostgreSQL database server version 9.4.1 installed on an OEL 6 server. I have a second PostgreSQL database server version 9.4.1 running on an identical OEL 6 server. The first PostgreSQL was installed by system admins using RPM. The second PostgreSQL was installed from source, using --prefix to set the user and path to the installation. I want to run a mirror on the second server.

I do not have root, and cannot get root on these systems. Also, the sys admins now refuse to install PostgreSQL anywhere. This is really annoying!

I've followed all the instructions found here:
https://www.postgresql.org/docs/9.4/static/warm-standby.html#STREAMING-REPLICATION

The slave, running PostgreSQL 9.4.1 built from source, runs fine after I've run initdb and set things up.
When I replace its data directory as part of the mirroring instructions, using pg_basebackup, PostgreSQL won't start.

I get a checksum error, from pg_ctl.
2016-12-15 08:27:14.520 PST >FATAL: incorrect checksum in control file

My guess is that despite the versions being the same, the binaries are different.

Is there a way to make this work, or should I give up? I wonder if the sys admins take bribes...

THANKS in advance!!
-- 

Richard Brosnahan
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL mirroring from RPM install to Source install

Tom Lane-2
Richard Brosnahan <[hidden email]> writes:
> I've got a PostgreSQL database server version 9.4.1 installed on an OEL 6 server. I have a second PostgreSQL database server version 9.4.1 running on an identical OEL 6 server. The first PostgreSQL was installed by system admins using RPM. The second PostgreSQL was installed from source, using --prefix to set the user and path to the installation. I want to run a mirror on the second server.

> I do not have root, and cannot get root on these systems. Also, the sys admins now refuse to install PostgreSQL anywhere. This is really annoying!

> I've followed all the instructions found here:
> https://www.postgresql.org/docs/9.4/static/warm-standby.html#STREAMING-REPLICATION

> The slave, running PostgreSQL 9.4.1 built from source, runs fine after I've run initdb and set things up.
> When I replace its data directory as part of the mirroring instructions, using pg_basebackup, PostgreSQL won't start.

> I get a checksum error, from pg_ctl.
> 2016-12-15 08:27:14.520 PST >FATAL: incorrect checksum in control file

> My guess is that despite the versions being the same, the binaries are different.

You could try using pg_controldata to compare the pg_control contents;
it should be willing to print field values even if it thinks the checksum
is bad.  It would be interesting to see (a) what the master's
pg_controldata prints about its pg_control, (b) what the slave's
pg_controldata prints about pg_control from a fresh initdb there, and
(c) what the slave's pg_controldata prints about the copied pg_control.

I am a little suspicious about whether the PG versions are really the same.
There's a bug in the 9.5.x series that it will issue a checksum complaint
not a version-number complaint if started against a 9.4.x pg_control.

                        regards, tom lane


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL mirroring from RPM install to Source install

marica.fr
In reply to this post by Richard Brosnahan
On Thu, 15 Dec 2016 16:42:13 +0000 (GMT)
Richard Brosnahan <[hidden email]> wrote:

>
> I get a checksum error, from pg_ctl.
> 2016-12-15 08:27:14.520 PST >FATAL: incorrect checksum in control file
>

Hi Richard,

Not sure if it applies, but just in case, I got this error when trying to use a cluster copied from one machine to another one because they had different processors.

It worked after I used a machine with the same processor.


--
                                        Bien à vous, Vincent Veyron

https://marica.fr/
Gestion des sinistres assurances, des dossiers contentieux et des contrats pour le service juridique


--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL mirroring from RPM install to Source install

Vincent Veyron
In reply to this post by Richard Brosnahan
[re-post, originally sent with wrong username]

On Thu, 15 Dec 2016 16:42:13 +0000 (GMT)
Richard Brosnahan <[hidden email]> wrote:

>
> I get a checksum error, from pg_ctl.
> 2016-12-15 08:27:14.520 PST >FATAL: incorrect checksum in control file
>

Hi Richard,

Not sure if it applies, but just in case, I got this error when trying to use a cluster copied from one machine to another one because they had different processors.

It worked after I used a machine with the same processor.


--
                                        Bien à vous, Vincent Veyron


https://marica.fr/
Gestion des sinistres assurances, des dossiers contentieux et des contrats pour le service juridique


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