Rubyrep with Postgres-> PG::ERROR: Connection is c

2019-05-25 23:43发布

问题:

I setup the rubyrep config file with the server information. No extra options. I tested if i could connect to both databases externally with PGAdmin.

When I try it out I see the connection spike on my monitoring graphs, so it does go in there and scan the initial table. I think* it connects to the 2nd table as well, but somewhere along the line it breaks. The error that I get is

Exception caught: PG::Error: connection is closed: show search_path

I have identical schema on both databases. My rubyrep version is 1.20, my pg version is 0.14, and I tried 0.11 and 0.12 as I saw in some question it fixed connection problems for some but I still have the problem. I am not sure what else is there left to try.


Adding more information

When I tried 2 local databases - there was no problem. So it doesn't seem to be a problem with my setup. When I changed the address to the external database as the one I want to copy from the above problem happened again.

When I was testing this I saw what looked like corresponding load spikes, however no data was returned. I have limited access to the server so cannot check if there is some problem that happens in server logs that actually causes ruby rep to give me that error.

回答1:

I found answer. Just use this repository https://github.com/ncoders/rubyrep !