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
6
votes
5 answers

using read replication in mysql

I have a mysql db which has around 150 millions inserts per day and retention period is around 60 days. Each record is indexed on id. Everytime a update happens as follows: Look if record is present. If it is , update the same with new data. Or…
user93796
  • 18,749
  • 31
  • 94
  • 150
6
votes
4 answers

Is it possible to do N-master => 1-slave replication with MySQL?

I want to make a dedicated SLAVE machine for data replication of three database on three different servers. In other words, I want to do Multiple Master => SIngle Slave replication. Is there any way to do this, as simple as it can be ? Thanks !
Amadeus45
  • 1,228
  • 2
  • 17
  • 28
6
votes
1 answer

Pause SQL server replication temporarily

We have a transactional replication setup using 3 SQL Servers, 1st as publisher, 2nd as distributor, and 3rd as subscriber. We have an activity to change the location of the replicated DB (subscriber) using de-attach and attach method. During this…
PyQL
  • 1,830
  • 3
  • 18
  • 22
6
votes
4 answers

Database distribution

What are the possibilities to distribute data selectively? I explain my question with an example. Consider a central database that holds all the data. This database is located in a certain geographical location. Application A needs a subset of the…
manash
  • 6,985
  • 12
  • 65
  • 125
6
votes
5 answers

Database synchronization

Recently my clients have asked me if they can use they’re application remotely, disconnected from the local network and the company server. One solution is to place the database in the cloud, but a connection to the database, and the cloud and an…
Jlouro
  • 4,515
  • 9
  • 60
  • 91
5
votes
3 answers

MySql - create replication with minimal downtime

I have a ~80GB MySql DB. I want to create a replication on that DB while having the current DB as master and setting up a slave for it. My main question is how can i move the data (all 80GB) of it from the master to the new slave with as minimal…
Ran
  • 3,455
  • 12
  • 47
  • 60
5
votes
1 answer

How to Handle Eventual Consistency Issues in MySQL Read/Write Splitting

I've been looking into solutions to scale MySQL. One that often comes up beyond adding a Memcached layer is read/write splitting -- all writes go to the master and all reads go to a set of load balanced slaves. The one issue that obviously comes up…
5
votes
2 answers

Can I write an activerecord scope which wraps the result in a block at query time?

Our rails app has a primary and a replica DB. We already have a method defined which takes a block, and while inside the block, queries will be made against the replica, like so: on_replica do @my_things = MyModel.where(my_attr: "my…
Simon
  • 25,468
  • 44
  • 152
  • 266
5
votes
1 answer

It is possible to alter SQL Server replication filter without delivering an entire publication snapshot?

I am constantly asked to change the filters on my companies SQL Server Transactional Publications which contain several hundred tables and roughly 400GBs of row data. Each time I am required to alter a filter, I have to completely re-snapshot the…
NTDLS
  • 4,757
  • 4
  • 44
  • 70
5
votes
1 answer

Future of "Logical Records" in SQL Merge Replication

I am building a new application which will be using SQL Merge Replication over very poor networks. It appears that the "Logical Records" feature would help significantly in coping with these network problems, ensuring that we can get complete…
5
votes
2 answers

Exception when starting Snapshot Agent when setting up database replication

I am trying to set up replication between databases. I followed this tutorials: https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-preparing-the-server-for-replication?view=sql-server-ver15 and…
5
votes
1 answer

org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped

Using postgres source connector in kafka. It works properly for some time and suddently stops with above error. Please assist if someone knows this issue.
5
votes
1 answer

SQLite backup using Windows DFS Replication

I have an application that use SQLite for storage, and I'm wondering whether it is safe to use Windows DFS Replication to backup the database file to a second server which has a cold standby instance of the application installed. Potentially…
Akash
  • 2,311
  • 1
  • 20
  • 37
5
votes
1 answer

PostgreSQL replication - how to update LSN after reading with pg_recvlogical and wal2json? (without superuser)

I am trying to implement a regular incremental changes dump for our PostgreSQL 9.5 database. I have opted for WAL, the wal2json plugin and pg_recvlogical. All works somehow, except for one thing: When all data are read, pg_recvlogical simply goes…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
5
votes
0 answers

golang sql package for read replicas

we are moving our prototype service to production environment. I dont find any best library/way to do mysql read replication in golang sql library. Our Mysql database services running on AWS RDS (one master and stwo slaves). Need to do the…
Vish K
  • 135
  • 5
  • 14