Questions tagged [replication]

Replication is the process of sharing any level of information so as to ensure consistency between redundant hardware/software resources to improve reliability, fault-tolerance, and accessibility

The concept of replication have been performed either asychronously/asychronously for DB and NFS Servers.

From the perspective of databases, this has been performed asychronously via log shipping: the copying of log files containing completed SQL transactions to be performed on one or more database servers setup as Slaves. MySQL, PostgreSQL, and SQL Server support this type of replication. MySQL has improved upon this in MySQL 5.5 with semisynchronous replication. PostgreSQL has improved upon this with Streaming Replication.

From the perspective of OS Disks, this has been accomplished by network RAID1 schemes such as DRBD. DRBD performs block-level synchronous replication betweent two disks over a network (preferably private netblocks). This type of replication does not perform well over geographic distances. On the other hand, a DRBD Server pair should be using crossover cabling on a local subnet for the fastest possible disk replication by shortening the network transmission distance. The use of DRBD can provide an additional layer of redundancy for products such as MySQL, PostgreSQL, SQLLite, and Ingres.

NoSQL databases, such as Cassandra and MongoDB, also perform replication. Excellent replication performance can be achieved with proper tuning and and enhancement of server networks.

Use this tag for replication of data and schema

3542 questions
152
votes
4 answers

Is it safe to delete mysql-bin files?

I have MM Replication in mysql, and I want to squeeze some free space in the box be deleting unnecessary files, I came across these mysql-bin files inside /var/db/mysql/ There are hundreds of those files like mysql-bin.000123, mysql-bin.000223 etc.…
user18530
82
votes
7 answers

How do I completely disable MySQL replication

I am running dual master MySQL replication and now want to move to a single database with no replication. How do I completely disable replication on both databases?
David Collie
39
votes
4 answers

MySQL relay log corrupted, how do I fix it? Tried but failed

A MySQL v5.1.61 relay got corrupted when the machine suddenly shut down. I tried to fix it but it didn't work. — How do I fix it? Did I do something wrong? As far as I've read, corrupted MySQL relay logs are easily fixed: change master to…
KajMagnus
  • 1,249
  • 2
  • 14
  • 21
39
votes
3 answers

MySQL 5.1.66 SSL connection error ERROR 2026 (HY000)

UPDATE2 Using WireShark I found out the problem string (I hope I did): 28 | 9.582638 | 192.168.18.128 | 192.168.18.129 | MySQL Response Error 1043 And the error is (according to docs): Error: 1043 SQLSTATE: 08S01 (ER_HANDSHAKE_ERROR) Message: Bad…
Sergei Danielian
  • 440
  • 1
  • 4
  • 9
31
votes
2 answers

What is the safest way to switch the binlog format at runtime?

Because of the following warning in mysqld.log: [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set…
quanta
  • 1,006
  • 9
  • 22
  • 36
28
votes
3 answers

Should a MySQL replication slave be set to read only?

I've got replication running on Percona Server 5.5 by following this guide and wondered if I should add read-only=1 to my slave's my.cnf to make it read only? The guide sets up replication for the mysql table so users are replicated but I am…
xref
  • 759
  • 2
  • 9
  • 16
28
votes
5 answers

Add article to transactional publication without generating new snapshot

Using SQL 2008 R2 transactional replication with pull subscribers, when we add an article, I'd like to avoid having to create an entire snapshot (the db is ~80 GB, so this takes hours). From this article, I've seen how to do this with a partial…
user175528
  • 381
  • 1
  • 3
  • 3
27
votes
1 answer

Splitting Snapshot files with MaxBCPThreads for Transactional Replication

I've just set up a publication, and I'm attempting to get the snapshot to apply faster. So far the Distribution Agent is respecting the MaxBCPThreads settings, but the Snapshot Agent is not. I'm expecting it to split the files so the threads on the…
26
votes
3 answers

Running pg_dump on a hot standby server?

Disclaimer: I admittedly haven't tried this yet, but I'm not sure I would know if it wasn't working correctly, so I wanted to ask. I would like to run a nightly backup job (via pg_dumpall) from a hot standby server running streaming replication, to…
jberryman
  • 481
  • 1
  • 5
  • 11
25
votes
3 answers

Postgresql doesn't accept replication connection

Plain old streaming replication. PostgreSQL: 9.2.7 Windows 8.1 64 bit My primary and secondary clusters are on same windows machine. I have already done pg_start_backup() and everything, so both nodes have exact same data. Now the problem with…
Sachin Verma
  • 839
  • 4
  • 11
  • 16
25
votes
1 answer

How do I query the running pg_hba configuration?

I want to test if a replication connection is authorized by pg_hba.conf on the provider before issuing the replication-starting command, and don't know how. (I have access to both unix and postgresql shells on both nodes) For the non-replication…
victorjtfranco
  • 353
  • 1
  • 3
  • 5
24
votes
3 answers

How to determine master in mysql master-slave

I am setting up MySQL Master-slave replication and I am trying to figure out how to handle the failover situation where I promote the slave to master (in the event that the master goes down). My application server needs to direct all writes to the…
Ethan Hayon
  • 375
  • 1
  • 3
  • 8
23
votes
5 answers

Using Postgresql logical replication, how do you know that the subscriber is caught up?

Postgresql has some interesting monitoring tools for monitoring the new logical replication system's progress, but I don't really understand them. The two tools I'm aware of are: pg_stat_replication and it's sibling: pg_stat_subscription I've read…
mlissner
  • 673
  • 1
  • 7
  • 20
22
votes
1 answer

How soon after updating expire_logs_days param and restarting sql will old binlogs get deleted?

MySQL 5.1.x | InnoDB | Windows My mysql data directory is starting to fill up with bin logs. I currently have the following settings configured in my windows mysql server:…
Mike B
  • 617
  • 4
  • 10
  • 17
21
votes
1 answer

In a MySQL Master/Slave replication, what would happen if I write to the Slave?

Several Questions Would the Slave entry remain until there is an insert/update/delete to the table on the Master that could affect the Slave? If not, how do I ensure that the Slave is in-sync with the Master going forward (either by deleting the…
kfmfe04
  • 849
  • 2
  • 8
  • 12
1
2 3
99 100