Questions tagged [database-replication]

Database replication is used to ensure consistency between redundant databases and to improve reliability and increase fault-tolerance. The replication process commonly involves continuously duplicating a "master" database to one or more additional "slave" databases.

Database replication can be used on many database management systems, usually with a master/slave relationship between the original and the copies. The master logs the updates, which then ripple through to the slaves. The slave outputs a message stating that it has received the update successfully, thus allowing the sending (and potentially re-sending until successfully applied) of subsequent updates.

1836 questions
4
votes
3 answers

couchdb as "briefcase": replication and/or database dumps?

I have a need to migrate some CouchDB database data back and forth between two desktop computers at different locations. One of the computers is Windows XP, one is a Macintosh running OS X 10.5. Neither can realistically connect to the other via the…
Jason S
  • 184,598
  • 164
  • 608
  • 970
4
votes
3 answers

Two Datacenters, connectivity breaks, both continue writing, connectivity returns, sync?

We have two datacenters, and are writing data to Mongo from both datacenters. The collection is sharded and we have the primary for one shard in datacenter A and primary for the other in datacenter B. Occasionally, connectivity between the…
Kevin J. Rice
  • 3,337
  • 2
  • 24
  • 23
4
votes
2 answers

MySQL replication be bi-directional

We have successfully set up a Master-Slave replication as described in MySQL literature. However, I'm curious if anyone has set up a bidirectional replication. For example, if one has a Drupal or Wordpress installation. The first ('master')…
Rick
  • 591
  • 1
  • 9
  • 23
3
votes
1 answer

How do I set the time interval for master-slave circular database replication?

I have successfully set up the master- slave replication on my 2 database servers. I have also set up the master to replicate on the slave and when the master is down, the slave to master replication also works. However, i am unable to set up the…
3
votes
1 answer

How can I implement a read slave (mySql) in rails 3.0.9?

I am using Rails 3.0.9. (With ruby 1.9.3) I have been looking into some replication gems (data_fabric, octopus, multi_db). Been wondering what is the best solution. Production ready, fast, AR3 compatible... I thought it was octopus till I saw this…
KensoDev
  • 3,285
  • 21
  • 38
3
votes
1 answer

MySQL replication - Error connecting to master

I'm trying to set up replication in MySQL but I am being given an error that I do not know how to fix - ERROR 1218 (08S01): Error connecting to master: Host 'sh047.mydomain.com' is not allowed to connect to this MySQL server I've added the…
David Gard
  • 11,225
  • 36
  • 115
  • 227
3
votes
1 answer

MySQL Master-Master replication & Auto-Increment column issue

I am doing some testing with master-master replication and I ran on some weird problem, I will try and describe the procedure I followed so that someone can perhaps reproduce the issue. I set up replication on 2 VMs and in the configuration file for…
3
votes
1 answer

How to process the PGReplicationStream from physical replication JDBC API?

I am trying to read the data from physical replication slot using JDBC's ReplicationAPI I am using Postgres 13 Here is the sample code LogSequenceNumber lsn = getCurrentLSN(sqlConnection); PGReplicationStream stream = …
HariHaravelan
  • 1,041
  • 1
  • 10
  • 19
3
votes
1 answer

Frequent Setup and Tear Down of SQL Server Replication

I am using the Visual Studio Database Project for my database. I have it setup to auto-build twice a week. When it builds it drops the database and recreates it from scripts. I really like the tear down and re-build system as it prevents junk from…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
3
votes
2 answers

Replication between Android and Sql Server

I want to do the replication between sql server & android sqlite.I have done downloading(sql server to Android) using WCF service.Uploading part also that way I can do it. My Problem is: After user change/enter table contents (e.g enter new…
Piraba
  • 6,974
  • 17
  • 85
  • 135
3
votes
1 answer

Synchronous vs asynchronous streaming replication for Postgres with PgPool

After reading the documentation of PgPool I was left confused which option would suit my use case best. I need a main database instance which would serve the queries and 1 or more replicas (standbys) of the main one which would be used for disaster…
vsir
  • 349
  • 2
  • 12
3
votes
0 answers

Postgres - Index only for READ ONLY copies

I am looking to design a system that will have a primary database instance and replica copies. To keep INSERT performance good, the fewer indexes we have on the primary is desired versus adding more indexes on the read only copy. Hoping to…
dhul.takker
  • 161
  • 1
  • 5
3
votes
0 answers

How to fix out-of-order sequence number with existing GTID error

I am attaching a database to a master and after a while, I get the following error when I run show slave status, I get the following error: An attempt was made to binlog GTID 1-XXX-XXXXXXXXX which would create an out-of-order sequence number with…
Finlay Weber
  • 2,989
  • 3
  • 17
  • 37
3
votes
1 answer

Pros and cons of multi-leader vs leaderless replication in databases?

What are all the pros and cons of multi-leader vs leaderless replication in databases? Here are some I can think of: In multi-leader, client only writes to one leader so there may be lower latency In leaderless, you can generally tolerate a greater…
shmth
  • 458
  • 3
  • 11
3
votes
1 answer

memory mapped file write failed in SQL Server Replication

I am getting the error "memory mapped file write failed" while trying to run Snap Shot Agent in Transactional Replication. Snap shot works fine if the table is having only a few hundreds of rows. And fails if the table contains few thousands of…