Problem with rserv replication

Started by Dan Mahoneyover 22 years ago4 messagesgeneral
Jump to latest
#1Dan Mahoney
dmahoney@deepdata.com

I'm trying to set up Postgres replication via rserv, but at this time
I'm forced to do so in an unusual fashion. Our production server is
running Postgres 7.1.3, and our development server is running Postgres
7.4. The production server is going to be migrated to 7.4 fairly soon,
but not right away. The development server (7.4) is going to become the
production server later today. When that happens we're going to want
(for the short term, anyway) to use the former production server (7.1.3)
as a database backup.

Therefor, what I'm trying to do is replicate from a 7.4 server to 7.1.3.
I've got rserv set up currently on the 7.1.3 machine. Below are the
steps I've taken. Note that the 7.1.3 machine is at 192.168.1.5 and the
7.4 machine is at 192.168.1.12, and the script is running on the 7.1.3
machine:

MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_contact_map pbc_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_corporate_contact pbcc_pbdc_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_corporate_details pbcd_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_log pbl_pbr_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_map pbm_pbr_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_natadv pbna_pbr_id
MasterAddTable --host=192.168.1.12 --user=dan --password=<password> yp
pbr_test pbr_id
SlaveAddTable yp pbr pbr_id
SlaveAddTable yp pbr_address pba_id
SlaveAddTable yp pbr_alias_names pban_pbr_id
SlaveAddTable yp pbr_contact pbc_id
SlaveAddTable yp pbr_contact_map pbc_id
SlaveAddTable yp pbr_corporate_contact pbcc_pbdc_id
SlaveAddTable yp pbr_corporate_details pbcd_id
SlaveAddTable yp pbr_log pbl_pbr_id
SlaveAddTable yp pbr_map pbm_pbr_id
SlaveAddTable yp pbr_natadv pbna_pbr_id
SlaveAddTable yp pbr_test pbr_id
Replicate --masterhost=192.168.1.12 --masteruser=dan
--masterpassword=<password> yp yp
<error occurred here>
Replicate --masterhost=192.168.1.12 --masteruser=dan
--masterpassword=<password> --slaveuser=postgres yp yp
<error occurred here>

The error that occurs is a very informative:

ERROR: -1

I've added some debug text to the Replicate script that shows me this
message is coming from the call to PrepareSnapshot.

Any suggestions on what might be causing this error?

#2Andrew Sullivan
andrew@libertyrms.info
In reply to: Dan Mahoney (#1)
Re: Problem with rserv replication

On Wed, Jan 07, 2004 at 01:28:59PM -0800, Dan Mahoney wrote:

Therefor, what I'm trying to do is replicate from a 7.4 server to 7.1.3.
I've got rserv set up currently on the 7.1.3 machine. Below are the
steps I've taken. Note that the 7.1.3 machine is at 192.168.1.5 and the
7.4 machine is at 192.168.1.12, and the script is running on the 7.1.3
machine:

I don't know whether rserv works with 7.4. I don't know whether
anyone tested it.

It uses Pg.pm, BTW, so you could be having pain there.

A

-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Afilias Canada                        Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110
#3The Hermit Hacker
scrappy@hub.org
In reply to: Andrew Sullivan (#2)
Re: Problem with rserv replication

On Wed, 7 Jan 2004, Andrew Sullivan wrote:

On Wed, Jan 07, 2004 at 01:28:59PM -0800, Dan Mahoney wrote:

Therefor, what I'm trying to do is replicate from a 7.4 server to 7.1.3.
I've got rserv set up currently on the 7.1.3 machine. Below are the
steps I've taken. Note that the 7.1.3 machine is at 192.168.1.5 and the
7.4 machine is at 192.168.1.12, and the script is running on the 7.1.3
machine:

I don't know whether rserv works with 7.4. I don't know whether
anyone tested it.

Actually, didn't rserv support break in 7.3, with the schema stuff? Or
did someone patch since ... ?

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: The Hermit Hacker (#3)
Re: Problem with rserv replication

"Marc G. Fournier" <scrappy@postgresql.org> writes:

On Wed, 7 Jan 2004, Andrew Sullivan wrote:

I don't know whether rserv works with 7.4. I don't know whether
anyone tested it.

Actually, didn't rserv support break in 7.3, with the schema stuff? Or
did someone patch since ... ?

I think it is broken in the sense that you could confuse it, by making
similarly-named tables in different schemas or something like that.
But if you aren't actively exploiting the schema feature then it still
works as well as it ever did.

I haven't tried it with 7.4 either, but I suspect the story is about the
same --- it won't break if you're still not using any schema features.

regards, tom lane