Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi master replication #19

Open
gcarranza opened this issue Oct 1, 2015 · 5 comments
Open

multi master replication #19

gcarranza opened this issue Oct 1, 2015 · 5 comments

Comments

@gcarranza
Copy link

is it possible use couchdb replicator over the postgres database on couch-to-postgres?

@gcarranza gcarranza changed the title multi master relication multi master replication Oct 1, 2015
@sysadminmike
Copy link
Owner

sorry im not clear on your question if you mean can it sync postgres as the source db then no

you can use the postgres http extension to populate a couchdb and then use couch as your datasource with master-master replication and using couch-to-postgres populate separate postgres databases.

This is currently how i am using it eg

Postgres at location 1
|
couch-to-postgres 1
|
couch at location 1
|
|
Internet
|
|
Couch at location 2
|
couch-to-postgres 2
|
Postgres at location 2

With couch 1 & 2 replicating to each other - so if you add a doc to couch 1 it will appear in postgres 2

@gcarranza
Copy link
Author

ok, perfect, i have another question
i need to know if you know other forms of doing master master replication with postgres and the advantages of using coudchb.
i'm asking you because i'm looking for master master replication and your tool looks very interesting

@sysadminmike
Copy link
Owner

Im not sure there is a simple method to do multi-master replication with postgres - this is the reason we chose couchdb as our datasource - we were using solr then elasticsearch for searching/querying the data when couch map/reduce was not enough.

however elasticsearch uses a LOT of memory (and needs more as the index grows) but with postgres we have gone down from 4gb vm for elasticsearch to a 2gb vm for postgres and no problems with memory issues.

Take a peek at: http://blog.2ndquadrant.com/jsonb-type-performance-postgresql-9-4/
for jsonb indexing stuff and postgres

@gcarranza
Copy link
Author

Thanks for you reply, i have another question for that im open a new issue about instalation

@sysadminmike
Copy link
Owner

sure ask away - btw i have released an npm: https://www.npmjs.com/package/couch-to-postgres
so should make life simpler to install with:

npm i couch-to-postgres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants