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.

3387 questions
140
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
80
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
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
33
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,139
  • 2
  • 13
  • 19
29
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
  • 996
  • 9
  • 21
  • 36
28
votes
0 answers

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…
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
26
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
  • 739
  • 2
  • 8
  • 16
25
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
  • 461
  • 1
  • 5
  • 11
23
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
  • 749
  • 4
  • 9
  • 15
23
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
  • 365
  • 1
  • 3
  • 8
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
  • 577
  • 3
  • 9
  • 17
21
votes
3 answers

What max_allowed_packet is big enough, and why do I need to change it?

I have MySQL (5.5) in master-slave setup and created another slave server. I stopped the original slave, dumped the data, copied and reimported and it worked fine. I noted the master_log pos of the original slave and used these commands to set it on…
CodeMonkey
  • 461
  • 1
  • 4
  • 9
21
votes
3 answers

PostgreSQL: Can I do pg_start_backup() on a live, running db under load?

Our established replication has broken ("requested WAL segment has already been removed" during downtime) We cannot easily stop the master again. Can we do pg_start_backup(), rsync ${PGDATA}/ master to slave, pg_stop_backup() ... while the…
Daniel
  • 313
  • 1
  • 2
  • 5
21
votes
3 answers

SQL Server database synchronization

Problem definition Our users need the ability to query a database that is mostly up to date. The data can be stale up to 24 hours and that is acceptable. What would be the lowest cost approach to getting and keeping a second database up to date with…
billinkc
  • 15,728
  • 4
  • 48
  • 88
1
2 3
99 100