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.

1648 questions
147
votes
14 answers

How to re-sync the Mysql DB if Master and slave have different database incase of Mysql replication?

Mysql Server1 is running as MASTER. Mysql Server2 is running as SLAVE. Now DB replication is happening from MASTER to SLAVE. Server2 is removed from network and re-connect it back after 1 day. After this there is mismatch in database in master and…
Indu Sharma
  • 1,471
  • 3
  • 10
  • 5
130
votes
5 answers

Using git repository as a database backend

I'm doing a project that deals with structured document database. I have a tree of categories (~1000 categories, up to ~50 categories on each level), each category contains several thousands (up to, say, ~10000) of structured documents. Each…
52
votes
1 answer

Difference between Stream Replication and logical replication

Could anybody tell me more about difference between physical replication and logical replication in PostgreSQL?
Simon Su
  • 1,633
  • 4
  • 17
  • 19
33
votes
2 answers

MongoDB replica set preventing queries to secondary

To set up the replica set, I've run in 3 separate terminal tabs: $ sudo mongod --replSet rs0 --dbpath /data/mining --port 27017 $ sudo mongod --replSet rs0 --dbpath /data/mining2 --port 27018 $ sudo mongod --replSet rs0 --dbpath /data/mining3…
Ryan Kennedy
  • 2,925
  • 4
  • 26
  • 44
30
votes
4 answers

Performance Tuning: Create index for boolean column

I have written a daemon processor which will fetch rows from one database and insert them into another for synchronizing. It will fetch rows based on a boolean indication flag sync_done. My table has hundreds of thousands of rows. When I select all…
Pavunkumar
  • 4,717
  • 10
  • 39
  • 67
26
votes
3 answers

check postgres replication status

Can someone suggest the steps to check pgsql replication status and when to say replication is not happening properly? We use streaming replication with pgsql9.0 and pgsql9.4 Thanks.
Dino Daniel
  • 377
  • 1
  • 3
  • 6
24
votes
3 answers

Length of LOB data (78862) to be replicated exceeds configured maximum 65536

Here is a related question. Why do I get this error even when I have not installed SQL Server replication ? The strangest thing is, when I run the fix sp_configure 'max text repl size', 2147483647 Go RECONFIGURE GO it works and I no longer get this…
ram
  • 11,033
  • 16
  • 59
  • 86
23
votes
3 answers

Optimistic vs Multi Version Concurrency Control - Differences?

I am trying to find out, what the difference between optimistic concurrency control (OCC) and multi version concurrency control (MVCC) is? So far I know that both is based on version checking for updates. In OCC, I read about transactions that…
chris polzer
  • 2,969
  • 2
  • 24
  • 38
23
votes
2 answers

MongoDB shell command line authentication fails

I set up replica set with authentication. I used this tutorial. I set up keyfile, admin user and other users. It all works fine - anonymous access is disabled and I can login $ mongo MongoDB shell version: 2.6.1 connecting to: test Error while…
Michal Artazov
  • 3,698
  • 8
  • 23
  • 36
22
votes
2 answers

MySQL replication Error 'You cannot 'ALTER' a log table if logging is enabled' on query

MySQL replication got broken with the last error being Last_Errno: 1580 Last_Error: Error 'You cannot 'ALTER' a log table if logging is enabled' on query. Default database: 'mysql'. Seems this is the fault of running mysql_upgrade for version…
Collector
  • 1,743
  • 2
  • 18
  • 37
20
votes
8 answers

SQL Server Update Trigger, Get Only modified fields

I am aware of COLUMNS_UPDATED, well I need some quick shortcut (if anyone has made, I am already making one, but if anyone can save my time, I will appriciate it) I need basicaly an XML of only updated column values, I need this for replication…
Akash Kava
  • 37,127
  • 20
  • 114
  • 162
19
votes
5 answers

Database replication on Raspberry Pi mesh network

Does anyone have a good suggestion as to what database I should use, to achieve replication across a variable number of targets? I have a mesh network of Raspberry Pi servers, each of which can contain a database. I want the contents of each…
16
votes
2 answers

Postgres Hot Standby and Long Running Queries On Slave

Question: Can you have long running queries (30s+) running while having WAL updates applied on the slave (the slave role is as a Reporting DB Server) in a Hot Standby mode? The way it's working now is, either you set the params below to kill long…
user1178516
  • 611
  • 1
  • 6
  • 9
16
votes
2 answers

Zookeeper/Chubby -vs- MySql NDB

I have been reading the Paxos paper, the FLP theorem etc. recently and evaluating Apache Zookeeper for a project. I have also been going thru Chubby (Google's distributed locking service) and the various literature on it that is available online. My…
15
votes
4 answers

expire_logs_days ignored in my.cnf

I've got a pair of MySQL databases that are set up for Master Slave replication. The slave is doing just fine. The master, on the other hand, has been hoarding binary logs despite my best (automated) efforts. I'm trying to set up the…
Cody S
  • 4,594
  • 7
  • 29
  • 63
1
2 3
99 100