简体   繁体   中英

Errors while I am trying to create replication to my postgres database

I am trying to create "replication" for my database. I watched many tutorials and documentations. Finally, I followed this tutorial in this video .

The problem is when I add the recovery data in recovery.conf I surprised that the whole cluster does work and its failed to start with: sudo systemctl stop postgresql@12-test Where "test" is the backup cluster. Then I tried many solutions but it was zero result. Next I removed data in the "test" cluster and I redo the steps for pg_basebackup without adding any thing to recovery.conf file and its started correctly and synchronized with the existing data in main cluster at the backup moment. Note: Its not synchronized with any data have been inserted recently after pg_basebackup . So, The problem is: Why when Adding data to recovery.conf file its failed to start and Absolutely I need to add data to make the replication works fine? Or If you can provide me with a suitable tutorial or documentation to this replication.

Note 2: I am trying to replication on the same PC then I'll move to it on cloud or on another PC.

Here is datasheet I followed with the video: Sheet

Discovered it. The file recovery.conf that is no longer used in postgresql 12.

I have followed other documents and solved my problem.

Now I have two synchronized devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM