![]() Update: I posted this question on stackoverflow and was asked to put it here insteadĪs mentioned by Craig Ringer, I did a new backup and checked and after setting up the slave server it worked.īut while I was doing all that I also remembered that there was an old server which was also being a slave from the old master db (A) (that server should have not been running and that is why I did not initially think of it).Īnyway, after taking the old slave down, and did back up and restore again, it simply worked.Īs I said, I initially thought it was because of a bad backup, but it ended up being an error message being produce by a third server (second slave db). This can only be solved by copying the WAL segments from the masterīut sadly I don't know what he means by copying the wal segments from the master using wall archive. ![]() He says: FATAL: timeline 2 of the primary does not match recovery target timeline 1 Googling I found almost the same question here but with no answers.įound a page from Michael Paquier who does describes what is happening to me (although he says it is a no issue from version 9.3). Primary_conninfo = 'host=serverB port=5432 user=replication-user' My recovery file looks like: standby_mode = 'on' 14:28:12 DETAIL: This server's history forked from timeline 1 at 19/FDCF9BA0. 14:28:12 ERROR: requested starting point 19/FE000000 on timeline 1 is not in this server's history 14:28:07 DETAIL: This server's history forked from timeline 1 at 19/FDCF9BA0. 14:28:07 ERROR: requested starting point 19/FE000000 on timeline 1 is not in this server's history 14:28:05 LOG: started streaming WAL from primary at 1A/58000000 on timeline 2 14:28:04 LOG: database system is ready to accept read only connections 14:28:04 LOG: consistent recovery state reached at 1A/581FA248 Here are the messages from A (new slave): 14:28:04 LOG: database system was shut down in recovery at 14:27:28 CET The problem here is that it doesn't really work any more, as it says they are in two different time lines. So, I take a backup from B, put it in server A, set up the recovery file and start it. Now I have recovered the broken server and want to set up again the replication so A can be the new slave. Until now it is all good and working fine. The server running A failed and we had to do a switchover, where we promoted B to be the new master. Create a Replication User on Master NodeĪ root password is set up on each server.įirst, you will need to install the MySQL server on both nodes.I have a postgres database (version 9.4) with streaming replication (master, slave configuration).In this post, we will show you how to set up a MySQL Master-Slave replication on Ubuntu 20.04 server. In the event of failures, you can bring up the Slave node. Replication can also reduce the load from the master server as the slave node will be involved in serving the application requests. All databases from the Master node will be replicated automatically to the Slave node. After implementing the MySQL replication, you don't need a regular database backup. ![]() Generally, it is used to increase the data availability and recover the data in case of failure. Replication is the process of copying data from one server to another at the same time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |