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
8
votes
3 answers

How does Replication work in a Distributed Database

I would like to know how replication works in a distributed database. It would be nice if this could be explained in a thorough, yet easy to understand way. It would also be nice if you could make a comparison between distributed transactions and…
7
votes
1 answer

Postgres: How do I safely remove a replica?

Do I need to do anything on the primary if I permanently remove its only replica? I'm concerned about WAL files filling up the disk. I want to remove the only replica from a single-node replication setup: P -> R I want to remove R.
Russell Smith
  • 153
  • 1
  • 5
7
votes
4 answers

Error from postgresql 9.0 archiving while configuring hot streaming replication

I am trying to get streaming replication running on postgresql 9.0. I am following the steps as mentioned in the link : http://brandonkonkle.com/blog/2010/oct/20/postgres-9-streaming-replication-and-django-balanc/ When I try to execute an archiving…
7
votes
2 answers

Why Postgres Replication Stream doesn't work when used in separate function?

I am working on postgres replication stream API. While working on it came across unusual behavior. When I use replication slot writing whole code inside main block, everything works fine. public class Server implements Config { public static void…
Dipesh
  • 305
  • 4
  • 13
7
votes
1 answer

cassandra sharding and replication

I am new to Cassandra was going though this Article explaining sharding and replication and I am stuck at a point that is - I have a cluster with 6 Cassandra nodes configured at my local machine. I create a new keyspace "TestKeySpace" with…
7
votes
1 answer

MongoDB SECONDARY becoming RECOVERING at nighttime

I am running a conventional MongoDB Replica Set consisting of 3 members (member1 in datacenter A, member2 and member3 in datacenter B). member1 is the current PRIMARY and I am adding members 2 and 3 via rs.add(). They are performing their initial…
proximus
  • 689
  • 7
  • 20
7
votes
7 answers

Adding a replica in MongoDB throws an error

I'm trying to add a node to a replica set using rs.add("developer-ViratualBox:30103") and I'm getting the following error message: { "ok" : 0, "errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the…
Ahmad Hosny
  • 597
  • 1
  • 6
  • 23
7
votes
2 answers

Logical decoding on a standby node

PostgreSQL 9.4 introduced Logical Decoding: http://www.postgresql.org/docs/9.4/static/logicaldecoding.html It also has Cascade Streaming Replication: http://www.postgresql.org/docs/9.4/static/warm-standby.html#CASCADING-REPLICATION Logical Decoding…
Flyer
  • 327
  • 2
  • 14
7
votes
2 answers

How a Repeatable Read transaction run on the standby could see a transient state?

In the PostgreSQL documentation about transaction isolation levels, we can read the following: While performing all permanent database writes within Serializable transactions on the master will ensure that all standbys will eventually reach a…
7
votes
1 answer

"ERROR while connecting to database. Error: Error: No valid replicaset instance servers found"

I'm using replicaset with 2 nodes(primary and secondary) and 1 arbiter(total 3). Sometimes I get "ERROR while connecting to database. Error: Error: No valid replicaset instance servers found" .I'm not able to reproduce(as it happens on its own and…
Shobhit Mishra
  • 337
  • 1
  • 2
  • 13
7
votes
2 answers

How to properly handle asynchronous database replication?

I'm considering using Amazon RDS with read replicas to scale our database. Some of our controllers in our web application are read/write, some of them are read-only. We already have an automated way for identifying which controllers are read-only,…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
7
votes
4 answers

Difference between data replication and synchronization?

I'm having trouble finding the differences between data synchronization and replication. From what I can tell, replication is making all data between 2 databases the same. Synchronization doesn't necessarily make ALL DATA between the two databases…
7
votes
2 answers

MySQL: Writing to slave node

Lets say I have a datbase of Cars. I have Makes and Models (FK to Makes). I plan on having users track their cars. each Car has a FK to Model. Now, I have a lot of users, and I want to split up my database to distribute load. The Makes and Models…
7
votes
1 answer

Parallel/Redundant Replication in CouchDB

I have multiple CouchDB servers I want to keep in sync with each other, and I use these servers to share large files (e.g. >100 MB). To keep them synchronized, I have each CouchDB instance do a continuous pull replication from each other…
7
votes
2 answers

why is the slave machine faster for reading than master in database replication

In the master/slave database replication, all writes go to the master machine. All reads go to the slave machine. The master machine replicates data to the slave. When the master replicates data to the slave, the slave machine has to do a write…
Kevin
  • 304
  • 3
  • 14