Hot answers tagged

4

The reason you were able to issue a single skip slave statement and it caught up, is because the SQL thread stopped, but the IO thread continues. As long as you see: Slave_IO_Running: Yes when you run SHOW SLAVE STATUS, then the slave is able to continually pull the binary logs from the master and store them into the relay logs. Regardless of ...


4

On a basic level, yes. Just set up the current Master like you would any normal slave database. However, there are some things to consider first. Is the second slave set to READ-ONLY, as you want to avoid writing to both masters at once. You probably want to set auto_increment_increment=2 and auto_increment_offset=1 on the first master, and ...


4

The DBMS can be left to deal with fault detection and recovery (when configured correctly). It would be most unusual to manually implement such behaviour in the application. Indeed, that is what a software stack is for - to remove from applications those features which are common and frequently required, much as an OS looks after memory management and thread ...


3

As for my experience with PostgreSQL it is relatively safe operation unless you have a really big performance impact on that moment. If you have it then it's better to temporary pause writing from all of your clients. I had only one critical case while syncing my master to slave under load and it was caused by OOM killer (yes, you really should COMPLETELY ...


3

tl;dr No. The binlogs contain a set timestamp command before every transaction exactly to prevent this situation. This will only affect the session scope of the SQL thread so running queries meanwhile won't report date 600 seconds in the past. To take a look you can run: $ sudo mysqlbinlog --base64-output=DECODE-ROWS binlog.XXXXX |head -30 #150613 ...


2

Replication Lag is usually measured by finding the difference between the following TIMESTAMP#1 at (Relay_Master_Log_File,Exec_Master_Log_Pos) TIMESTAMP#2 at (Master_Log_File,Read_Master_Log_Pos) From what I am seeing in the SHOW SLAVE STATUS\G you are 98230 seconds (27 hours 17 minutes 10 seconds) behind you have 329 binlogs (278337 - 278008) to ...


2

Transactional replication works well in this scenario for replicating your data to your reporting databases. It's cheaper than availability groups as you can replicate back to your single server instance to create a reporting database, rather than having an availability group where you have to pay for a second licence if you are reading the secondary data. ...


2

Connecting to a replica set Most drivers will show the following behavior, as far as I know If only a single node is given, the driver will simply connect to this node. If the replicaSet option is given in the connection string, the driver will start to explore said replica set to identify all non-hidden members, regardless of the number of nodes given in ...


2

If it's one time setup, I think dump would be easiest. But if You need your update be available on customer, then I think streaming replication would be easier, set up once and no need to update in the future as the replication will handle the data updates. http://www.postgresql.org/docs/current/static/high-availability.html


2

https://dev.mysql.com/doc/refman/5.7/en/replication-features-differing-tables.html describes the supported variations in table definitions. For one, it appears that this is supported with statement-based replication: When using statement-based replication, a simple rule of thumb to follow is, “If the statement run on the master would also execute ...


1

By Default cql will convert the table/keyspace/column name in lowercase. If you have table/keyspace/column in uppercase you have to enclose it in double quotes. alter KEYSPACE "HiveMetaStore" with replication = {'class': 'NetworkTopologyStrategy', 'DCassandra1': 1}; Opscenter handled it for you:) CQL UpperCase/lowercase


1

Answer to 2) question - Most probably you had some minor version upgrade for your master 5.5 MySQL server. There is a bug for 5.0 - Bug #50876 and according to my experience, the same bug exists in 5.5


1

Not with the technology you use - this is not what replication is intended to do. A filter is indeed an active filter, also removing objects. You CAN add a specific field for that that you never reset.


1

I can set up the subscription if I add the server name and ip into the hosts file. Not pretty, but it works.


1

It does make sense, actually it's a rather common scenario. Both servers have to be fully licensed. Alternatively, with AGs, you can use read-only replica for reporting. It does have it's limitation (eg, you cannot modify schema to suit the reporting needs), not least being an enterprise-only feature (but not any more with 2016, I believe).


1

The statement you are reading in the Microsoft article says that you should not (and cannot) put a Distribution database inside an Availability Group. Why? Because the distribution database is a System database and Availability Groups will only fail over User databases. Therefore you will require another (4th) server in your situation to act as the ...


1

for replicating an specific set of data, you can create a view and replicate it. here you can see what data you can publish there is a small detail though: All types of replication allow you to replicate views. The view (and its accompanying index, if it is an indexed view) can be copied to the Subscriber, but the base table must also be ...


1

Like you found yourself already, the fastest way to copy a complete database within the same DB cluster is CREATE DATABASE with a TEMPLATE. This just copies a whole DB on the file level. CREATE DATABASE master_db_copy TEMPLATE master_db; The original (the "template", master_db in the example) cannot have any concurrent connections to it. You can use ...


1

Start by splitting your confidential info out of the table. Make a 'parallel' table ('vertical partitioning'). The new table would have the same PRIMARY KEY as the original, so they can easily be JOINed together. To avoid replicating the new table, either use replicate_ignore_wild=... on the slave or put the table in a different database and use ...


1

The valid and live members from replica set will automatically detect the arbiter which is in your replica set but not specified in connection. The driver will redirect the request to only Primary and secondaries knowing that arbiter will not serve any requests. It helps in voting in case of failover. However, its always good idea to add all members in ...


1

As already suggested, you cannot achieve this using backup/restore. You can also not achieve it using log shipping. I would look at using transactional replication perhaps from views, which would define the 60 to 90 day window. Be aware (or make your stakeholders aware) that replication is not free and comes with its own (usually small) performance ...


1

Restoring the database will break replication, so that's normal. Also most of the other error messages are just follow ons because you haven't been able to remove all the subscriptions (or at least SQL thinks so). You know you have your publisher (the source database), and at least one subscriber (the destination database), and that these are two different ...


1

TLDR: It appears that disabling and re-enabling replication probably fixed the issue: exec sp_replicationdboption @dbname = N'DatabaseName', @optname = N'publish', @value = N'false' exec sp_replicationdboption @dbname = N'DatabaseName', @optname = N'publish', @value = N'true' I guess this is the equivalent of switching it off and then back on again... ...


1

Community Wiki answer generated from a question comment by a_horse_with_no_name Create symbolic links on the slave that match the mount points of the tablespaces on the master.


1

Typically, you don't. Thinking of your nodes in terms of primary or secondary is the wrong way to approach it. Since standard data bearing nodes should have the same dimensions, it is better to think of them as replica set members, one of which gets elected to primary. Since the drivers are replica set aware and know which the current primary is and you are ...



Only top voted, non community-wiki answers of a minimum length are eligible