replication

PostgreSQL Switchover and Switchback in 9.4.1

孤街醉人 提交于 2020-01-15 08:48:23
问题 Environment: PostgreSQL EDB 9.4.1 OS:rhel 7 I have configured streaming replication with continuous archiving. I have performed the steps below for switch-over and switchback. I have read this other articles. I am confused what happens if the archive location is not a shared location. I have followed the steps below for switchover and switchback. SWITCHOVER At the master (192.xxxx.128) pg_ctl -D /opt/PostgresPlus/9.4AS/data stop --mode=fast Create recovery.conf : standby_mode = 'on' primary

MySQL: Writing to slave node

拟墨画扇 提交于 2020-01-13 09:06:11
问题 Lets say I have a datbase of Cars. I have Makes and Models (FK to Makes). I plan on having users track their cars. each Car has a FK to Model. Now, I have a lot of users, and I want to split up my database to distribute load. The Makes and Models tables don't change so much, but they need to be shared across shards. My thought is to use MySQL replication from a master DB of makes and models to each slave database. My question is: Can I safely write to the slave databases assuming I don't

mysql replication - slave server on one database

痞子三分冷 提交于 2020-01-12 06:47:29
问题 I couldn't find an answer to my question. I have 2 mysql servers. Master server Slave server Now i want to add another Slave server but i have other website running on that server. Can i replicate just one database? 回答1: Yes you can If you want to replicate just one database from master, you can set replicate-do-db in your /etc/my.cnf or set replicate-do-db as mysql argument, for example: replicate-do-db=db01 If you have multi databases to be replicated, /etc/my.cnf should be like this:

MySQL could not replicate in case master is down in cluster and then gets up

廉价感情. 提交于 2020-01-07 07:19:07
问题 I have MySQL cluster (NDB) containing 2 servers[NodeA and NodeB]. I have another machine having InnoDB[NodeC] outside cluster. NodeA is master for NodeC replication slave. Problem arises when NodeA is down in cluster, and some transaction take place at NodeB of the cluster. When NodeA is again up and running, all data is sync between NodeA and NodeB. [I set sql_slave_skip_counter=1 into NodeC to remove LOST_EVENT error.] But the data is not replicated to NodeC. If after that any transaction

Using RMO, how can I get the list of Local Subscriptions from SQL Server?

孤人 提交于 2020-01-05 06:27:29
问题 Using SQL Server Management Studio, it is easy to see the list of of Local Subscriptions on the subscriber database under the Replication folder. My question is how do I get that list programmatically . I know that I can use RMO to create a subscription. I want to know how to get a list of all of the existing Local Subscriptions. 回答1: The Publication.EnumSubscriptions Method returns the subscriptions that subscribe to a publication. This would be the equivalent of executing sp

charsets in MySQL replication

让人想犯罪 __ 提交于 2020-01-04 12:22:11
问题 What can I do to ensure that replication will use latin1 instead of utf-8? I'm migrating between an MySQL 5.1.22 server (master) on a Linux system and a MySQL 5.1.42 server (slave) on a FreeBSD system. My replication works well, but when non-ascii characters are in my varchars, they turn "weird". The Linux/MySQL-5.1.22 shows the following character set variables: character_set_client=latin1 character_set_connection=latin1 character_set_database=latin1 character_set_filesystem=binary character

Transactional Replication Questions

僤鯓⒐⒋嵵緔 提交于 2020-01-04 03:33:56
问题 I have the following questions about how transactional replication handles the following. For the sake of example, assume database 'A' is being replicated (via transactional replication) to database 'B'. If a table in database ‘A’ is dropped, will the table get dropped in ‘B’? If a table in ‘A’ is renamed, what happens to the table in ‘B’? If we drop a column in a table in database ‘A’, what will happen to the column in the same table in database ‘B’? If we rename a column in a table in

Transactional Replication Questions

亡梦爱人 提交于 2020-01-04 03:33:12
问题 I have the following questions about how transactional replication handles the following. For the sake of example, assume database 'A' is being replicated (via transactional replication) to database 'B'. If a table in database ‘A’ is dropped, will the table get dropped in ‘B’? If a table in ‘A’ is renamed, what happens to the table in ‘B’? If we drop a column in a table in database ‘A’, what will happen to the column in the same table in database ‘B’? If we rename a column in a table in

Snapshot of EBS volume used for replication

耗尽温柔 提交于 2020-01-02 07:14:06
问题 I setup an EC2 instance with MySQL on EBS volume and setup another instance which acts as Slave for Replication. The replication set up was fine. My question is about taking snapshots of these volumes. I noticed that the tables need to be locked for the snapshot process which may cause inconvenience for the users. So, my idea is to leave the Master instance alone and take a snapshot of instance acting as slave. Is this a good idea? Is there anyone out with a similar setup and could guide me

“[conn557392] killcursors: found 0 of 1” in Mongodb replication primary log

你说的曾经没有我的故事 提交于 2020-01-02 06:10:11
问题 I am running a production mongodb replication with version 2.6 now. Today I found out that the primary mongod instance keeps writing log: [conn557392] killcursors: found 0 of 1 And I checked the db.serverStatus().metrics.cursor, there are indeed a great amount of timedout cursor as mentioned in this discussion. My questions are Because I set all my read logic as Secondary preferred, the primary suppose to be write only. Why it needs to kill the cursor? The cursor suppose to be only for read?