{"id":361003,"date":"2024-05-21T01:04:32","date_gmt":"2024-05-21T01:04:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=361003"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=361003","title":{"rendered":"<span>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c High Availability PostgreSQL<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0439 \u0422\u0430\u0440\u0430\u0441\u0435\u043d\u043a\u043e, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e DBA \u0432 \u0410\u0432\u0438\u0442\u043e \u0441 2022 \u0433\u043e\u0434\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e High Availability (HA) \u0432 PostgreSQL. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HA \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 PostgreSQL. \u0410 \u0437\u0430\u0442\u0435\u043c \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443 \u043d\u0430\u0441 \u0432 \u0410\u0432\u0438\u0442\u043e.<\/p>\n<p>\u0421 \u044d\u0442\u0438\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u044f \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b \u043d\u0430 \u043c\u0438\u0442\u0430\u043f\u0435 \u00abPostgreSQL: HA \u0432 Avito\u00bb. \u0417\u0434\u0435\u0441\u044c \u2014 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u043a\u043b\u0430\u0434\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c27\/ede\/0be\/c27ede0be5f0098ac2098ec31f22c4d4.JPG\" width=\"1920\" height=\"1080\"\/><\/figure>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f: HA, RTO, RPO<\/h3>\n<p><strong>High Availability (HA)<\/strong> \u2014 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0437\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0437-\u0437\u0430 \u0430\u0432\u0430\u0440\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u0431\u0438\u0437\u043d\u0435\u0441 \u0445\u043e\u0447\u0435\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u0442\u043e \u00ab\u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u00bb \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 RTO.\u00a0<\/p>\n<p><strong>Recovery Time Objective<\/strong> <strong>(RTO)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0438 \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 RPO.\u00a0<\/p>\n<p><strong>Recovery Point Objective (RPO)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u043f\u043e\u0442\u0435\u0440\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b5\/455\/aac\/3b5455aac8cba4365e657eed7c3f3f0b.png\" alt=\"\u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u043e\u0438\u0442. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a (\u0425\u0430\u0431\u0440)\" title=\"\u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u043e\u0438\u0442. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a (\u0425\u0430\u0431\u0440)\" width=\"1560\" height=\"594\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b5\/455\/aac\/3b5455aac8cba4365e657eed7c3f3f0b.png\"\/><\/p>\n<div><figcaption>\u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u043e\u0438\u0442. <a href=\"https:\/\/habr.com\/ru\/companies\/veeam\/articles\/328068\/\"><u>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a (\u0425\u0430\u0431\u0440)<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<p>RTO \u0438 RPO \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0437\u043e\u043b\u043e\u0442\u0430\u044f \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0430, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u043e\u043d\u0430 \u0441\u0442\u043e\u0438\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443 \u0438\u0437-\u0437\u0430 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430. \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0414 \u0437\u0430 1 \u043c\u0438\u043d\u0443\u0442\u0443, \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430: \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043f\u043b\u0430\u043d\u043e\u0432 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u043b\u044e\u0434\u0435\u0439. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u2014 \u0441 RPO.<\/p>\n<h3>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability<\/h3>\n<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e 3 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443. \u0414\u043b\u044f \u043d\u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 PostgreSQL, \u043d\u043e \u0443 \u043d\u0438\u0445 \u043c\u043d\u043e\u0433\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432.<\/p>\n<p><strong>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. <\/strong>\u041f\u0435\u0440\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043e\u0431\u0449\u0435\u0439 \u0421\u0425\u0414. \u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u043e\u0442\u043a\u0430\u0436\u0435\u0442, \u0412\u041c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/24f\/750\/7e8\/24f7507e8a1791c72f39dcf2a5c89a24.png\" alt=\"\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0412\u041c \u0431\u0430\u0437\u044b. \u0412\u041c \u0441 \u0411\u0414 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435\" title=\"\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0412\u041c \u0431\u0430\u0437\u044b. \u0412\u041c \u0441 \u0411\u0414 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435\" width=\"1600\" height=\"541\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24f\/750\/7e8\/24f7507e8a1791c72f39dcf2a5c89a24.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0412\u041c \u0431\u0430\u0437\u044b. \u0412\u041c \u0441 \u0411\u0414 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 IO \u0421\u0425\u0414 (\u044d\u0444\u0444\u0435\u043a\u0442 \u00ab\u0448\u0443\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0430\u00bb),<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0449\u0438\u0442\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u0414\u0426,<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0441\u0442\u0440\u0430\u0445\u0443\u0435\u0442 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u041e\u0421 \u0438 \u0411\u0414,<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e\u0439: \u0438 \u043f\u043e \u0434\u0435\u043d\u044c\u0433\u0430\u043c, \u0438 \u043f\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0431\u0430\u0437\u0430. <\/strong>\u0414\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043f\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u0430\u0437\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432 \u0434\u0435\u043d\u044c. \u0418\u0437 \u043f\u043b\u044e\u0441\u043e\u0432 \u2014 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c RTO. <\/p>\n<p>\u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0437 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e,<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 RPO, \u0447\u0435\u043c \u043f\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043f\u0438\u0439 \u0431\u0430\u0437\u044b. <\/strong>\u0422\u0440\u0435\u0442\u044c\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0439\u0442\u0438 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u2014 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c Multi-Master, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0447\u0442\u0435\u043d\u0438\u044e \u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0438\u0437\u043a\u0438\u0435 RTO\/RPO \u2014 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0411\u0414 \u043e\u043d\u043b\u0430\u0439\u043d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ff1\/287\/787\/ff128778724ecc8028948eadfc88c5cb.png\" alt=\"\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f \u0411\u0414 \u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445\" title=\"\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f \u0411\u0414 \u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445\" width=\"1600\" height=\"561\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ff1\/287\/787\/ff128778724ecc8028948eadfc88c5cb.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f \u0411\u0414 \u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430, \u043d\u043e \u043d\u0435 \u043c\u0435\u0440\u0442\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0434\u043e\u0448\u0435\u0434\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u043e\u0445\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432 \u043b\u043e\u0431;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<h3>High Availability \u0432 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WAL-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438\u00a0<\/h3>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0431\u0435\u0437 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0411\u0414. \u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0430\u0437\u044b. \u0412 PostgreSQL \u0435\u0441\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 \u2014 Write-Ahead Log, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>Write-Ahead Logging (WAL)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0416\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0414 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0441\u0431\u043e\u0439. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0411\u0414 \u043e\u043d\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 WAL. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 WAL \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u0440\u043e\u0439\u0434\u044f\u0441\u044c \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u044f\u043c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435.\u00a0<\/p>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/wal-intro.html\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e WAL \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 PostgreSQL \u2192<\/u><br \/><\/a><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/459250\/\"><u>\u0421\u0442\u0430\u0442\u044c\u044f WAL \u0432 PostgreSQL: \u0416\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 \u2192<\/u><\/a><\/p>\n<p><strong>\u0412 PostgreSQL 9.0+ \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 WAL<\/strong>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0436\u0434\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0433\u043e WAL-\u0444\u0430\u0439\u043b\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0421 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 WAL-\u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 Primary-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043f\u043b\u0438\u043a.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 PostgreSQL \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u2014 primary \u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0435, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 primary \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c WAL-\u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/15\/warm-standby\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0443\u044e WAL-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u2192<\/u><\/a><\/p>\n<h3>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f High Availability \u0432 PostgreSQL<\/h3>\n<p>\u0412 PostgreSQL \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability.\u00a0<\/p>\n<ol>\n<li>\n<p><strong>repmgr<\/strong> (Replication Manager for PostgreSQL) \u2014 \u043f\u0438\u043e\u043d\u0435\u0440 \u0432 High Availability \u0434\u043b\u044f PostgreSQL. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 C \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u043a \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Witness-\u043d\u043e\u0434\u044b. <br \/><a href=\"https:\/\/github.com\/EnterpriseDB\/repmgr\"><u>repmgr \u043d\u0430 GitHub \u2192<\/u><\/a>\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Patroni<\/strong> \u2014\u00a0\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Python. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 DCS. \u0415\u0441\u0442\u044c REST API \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 k8s. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c PostgreSQL \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. <br \/><a href=\"https:\/\/github.com\/zalando\/patroni\"><u>Patroni \u043d\u0430 GitHub \u2192<\/u><\/a>\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Stolon<\/strong> \u2014\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Golang \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 k8s. \u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:\u00a0<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>sentinel \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>keeper \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 PostgreSQL \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443,<\/p>\n<\/li>\n<li>\n<p>proxy \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a \u043a\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/sorintlab\/stolon\"><u>Stolon \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<ol start=\"4\">\n<li>\n<p><strong>Corosync + Pacemaker<\/strong>. \u0428\u0430\u0431\u043b\u043e\u043d HA \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<br \/><a href=\"https:\/\/github.com\/corosync\/corosync\"><u>Corosync \u043d\u0430 GitHub \u2192<\/u><br \/><\/a><a href=\"https:\/\/github.com\/ClusterLabs\/pacemaker\"><u>Pacemaker \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>PAF<\/strong> (PostgreSQL Auto Failover). \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f Corosync + Pacemaker.<br \/><a href=\"https:\/\/github.com\/ClusterLabs\/PAF\"><u>PAF \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>pg_auto_failover<\/strong>. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C. \u041f\u043e \u0434\u0443\u0445\u0443 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 repmgr.<br \/><a href=\"https:\/\/github.com\/hapostgres\/pg_auto_failover\"><u>pg_auto_failover \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>Bucardo<\/strong>. Perl-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e Multi-Master \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.<br \/><a href=\"https:\/\/github.com\/bucardo\/bucardo\"><u>Bucardo \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>EDB<\/strong> (aka 2ndQuandrant BDR). Enterprise-\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043e\u0431\u0435\u0449\u0430\u044e\u0449\u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c 99,99%+ \u0437\u0430 \u043a\u0443\u0447\u0443 \u0434\u0435\u043d\u0435\u0433.<br \/><a href=\"https:\/\/www.enterprisedb.com\/\"><u>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 EDB \u2192<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<h3>High Availability \u0432 \u0410\u0432\u0438\u0442\u043e: \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412\u043e\u0442 \u0441\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability:<\/p>\n<ol>\n<li>\n<p><strong>PostgreSQL 15<\/strong> \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>Patroni<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f High Availability \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Consul<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (Distributed Configuration Store, DCS) \u0434\u043b\u044f Patroni.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Ceph<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>WAL-G<\/strong> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0430\u043f\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9fe\/ee9\/e9b\/9feee9e9b35350db4fbf9c0bb3217a2d.png\" alt=\"\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 High Availability\" title=\"\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 High Availability\" width=\"1600\" height=\"801\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9fe\/ee9\/e9b\/9feee9e9b35350db4fbf9c0bb3217a2d.png\"\/><\/p>\n<div><figcaption>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 High Availability<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0436\u0435\u043b\u0435\u0437\u0430. \u0412 \u0410\u0432\u0438\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0411\u0414 \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043a\u0430\u0440\u0442, \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0430\u0445, \u0430 \u0435\u0449\u0451 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c RAID.\u00a0<\/p>\n<p><strong>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RTO \u0438 RPO<\/strong> \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p><code>loop_wait<\/code> <em>= 10 \u0441\u0435\u043a\u0443\u043d\u0434<\/em> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 DCS;<\/p>\n<\/li>\n<li>\n<p><code>retry_timeout<\/code><em> = 55 \u0441\u0435\u043a\u0443\u043d\u0434<\/em> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 DCS;<\/p>\n<\/li>\n<li>\n<p><code>ttl<\/code> <em>= 2 \u043c\u0438\u043d\u0443\u0442\u044b<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0438\u0432\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043b\u0438\u0434\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p><code>master_start_timeout<\/code><em> = 2 \u043c\u0438\u043d\u0443\u0442\u044b<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0434\u0430\u0442\u044c \u043b\u0438\u0434\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u043e\u0442\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p><code>maximum_lag_on_failover<\/code> <em>= 160 \u041c\u0431<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p>RTO \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435: 2 \u043c\u0438\u043d\u0443\u0442\u044b,<\/p>\n<\/li>\n<li>\n<p>RPO \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435: 160 \u041c\u0431.<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/504044\/\"><u>\u0411\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043f\u0440\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 PostgreSQL-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u2192<\/u><\/a><\/p>\n<h3>\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 Split Brain<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 High Availability \u0437\u0430\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0442\u043e \u0431\u0435\u0437 \u0434\u043e\u043b\u0436\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440\u043e\u0432: primary, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0438\u0433\u0440\u0430\u043b\u0438 \u0433\u043e\u043d\u043a\u0443 \u0437\u0430 \u043a\u043b\u044e\u0447. \u041e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043b\u044f\u0436\u0435\u0442 \u0441\u0435\u0442\u044c. \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Split Brain, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u0437\u0433 \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 Split Brain \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0435\u0434\u0438\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0437 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Split Brain, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0442\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0439 \u043b\u0438\u0434\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440\u043e\u0432. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0430\u0432\u0434\u044b.<\/p>\n<p><strong>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f Split Brain<\/strong> \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Patroni \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Consul (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 DCS):<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043a\u0430 \u0432 DCS TTL \u043b\u0438\u0434\u0435\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 WAL;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 DCS, \u0442\u043e \u0438 \u043b\u0438\u0434\u0435\u0440, \u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0436\u0438\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 Consul \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b, \u0442\u043e \u043e\u043d \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 (\u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 Raft).<\/p>\n<\/li>\n<\/ul>\n<p><strong>Raft<\/strong> \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438 \u044f\u0432\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0434\u0435\u0440\u0430 \u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p><a href=\"http:\/\/thesecretlivesofdata.com\/raft\/\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Raft \u2192\u00a0<\/u><\/a><\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438<\/h3>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438<\/strong> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430:\u00a0<\/p>\n<ol>\n<li>\n<p>Patroni \u0443\u0437\u043d\u0430\u0435\u0442 \u043e \u043b\u0438\u0434\u0435\u0440\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0430\u0432\u0434\u044b \u2014 Consul.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0430 PostgreSQL \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u0437 \u0431\u044d\u043a\u0430\u043f\u0430 \u0432 Ceph.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0430 PostgreSQL \u0434\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0431\u044d\u043a\u0430\u043f\u043e\u0432 WAL.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043b\u0438\u0434\u0435\u0440\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f.<\/p>\n<p><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aec\/189\/389\/aec189389ca85884e5e42ead0fe32bf8.png\" width=\"1480\" height=\"788\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aec\/189\/389\/aec189389ca85884e5e42ead0fe32bf8.png\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e<\/p>\n<p><strong>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 <\/strong>\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435.<strong> <\/strong>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 Patroni \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c\/\u0437\u0430\u0431\u044b\u0442\u044c \u0435\u0451.<\/p>\n<h3>\u041e\u0442\u043a\u0430\u0437 \u043b\u0438\u0434\u0435\u0440\u0430<\/h3>\n<p>\u0412\u043e\u0442, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043c\u0435\u043d\u0430 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043e\u0442\u043a\u0430\u0437\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 High Availability \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0438 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 DCS \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c <code>loop_wait<\/code> (10 \u0441\u0435\u043a\u0443\u043d\u0434), \u043e\u0436\u0438\u0434\u0430\u044f \u043e\u0442\u0432\u0435\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 <code>retry_timeout<\/code> (55 \u0441\u0435\u043a\u0443\u043d\u0434).<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0438\u0434\u0435\u0440 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0432 Consul \u0441\u043f\u0443\u0441\u0442\u044f ttl (2 \u043c\u0438\u043d\u0443\u0442\u044b) \u0438\u043b\u0438 PostgreSQL \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043f\u0443\u0441\u0442\u044f <code>master_start_timeout<\/code> (2 \u043c\u0438\u043d\u0443\u0442\u044b), \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0438\u0434\u0435\u0440 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u044b \u0441 \u0443\u0447\u0451\u0442\u043e\u043c <code>maximum_lag_on_failover<\/code> (160 \u041c\u0431) \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u0441\u0442\u0430\u043b\u0430\u00a0 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430 (\u043f\u0440\u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0440\u0430\u0432\u043d\u044b\u0445, \u0432\u044b\u0438\u0433\u0440\u0430\u0435\u0442 \u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435).<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2a8\/df0\/3d5\/2a8df03d573df981e1b76b3efb7639a5.png\" alt=\"\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e\" title=\"\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e\" width=\"1600\" height=\"566\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2a8\/df0\/3d5\/2a8df03d573df981e1b76b3efb7639a5.png\"\/><\/p>\n<div><figcaption>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><strong>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/runtime-config-replication.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. \u0420\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/high-availability.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. High Availability<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/wal-intro.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. Write-Ahead Logging.<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/15\/warm-standby\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL Pro. \u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u043d\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b.<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/thesecretlivesofdata.com\/raft\/\"><u>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 Raft \u0441 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/504044\/\"><u>\u0422\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043d\u0430 \u0425\u0430\u0431\u0440\u0435: \u00ab\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 PostgreSQL \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Patron\u00bb<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/veeam\/articles\/328068\/\"><u>\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e RTO \u0438 RPO<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f High Availability \u0432 PostgreSQL<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/EnterpriseDB\/repmgr\"><u>Replication Manager (repmgr) \u043d\u0430 GitHub<\/u><\/a>.\u00a0<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/zalando\/patroni\"><u>Patroni \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/sorintlab\/stolon\"><u>Stolon \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/corosync\/corosync\"><u>Corosync \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/ClusterLabs\/pacemaker\"><u>Pacemaker \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/ClusterLabs\/PAF\"><u>PostgreSQL Auto Failover (PAF) \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/hapostgres\/pg_auto_failover\"><u>pg_auto_failover \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/bucardo\/bucardo\"><u>Bucardo \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.enterprisedb.com\/\"><u>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 EDB<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0410\u0432\u0438\u0442\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/hashicorp\/consul\"><u>Consul \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/wal-g\/wal-g\"><u>WAL-G \u043d\u0430 GitHub<\/u><\/a>.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/ceph\/ceph\"><u>Ceph \u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<p><em>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f:<\/em> <a href=\"https:\/\/habr.com\/ru\/companies\/avito\/articles\/773056\/\"><em>\u041a\u0430\u043a \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435: \u043e\u043f\u044b\u0442 \u0410\u0432\u0438\u0442\u043e<\/em><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/775922\/\"> https:\/\/habr.com\/ru\/articles\/775922\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0439 \u0422\u0430\u0440\u0430\u0441\u0435\u043d\u043a\u043e, \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e DBA \u0432 \u0410\u0432\u0438\u0442\u043e \u0441 2022 \u0433\u043e\u0434\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e High Availability (HA) \u0432 PostgreSQL. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HA \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 PostgreSQL. \u0410 \u0437\u0430\u0442\u0435\u043c \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443 \u043d\u0430\u0441 \u0432 \u0410\u0432\u0438\u0442\u043e.<\/p>\n<p>\u0421 \u044d\u0442\u0438\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u044f \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b \u043d\u0430 \u043c\u0438\u0442\u0430\u043f\u0435 \u00abPostgreSQL: HA \u0432 Avito\u00bb. \u0417\u0434\u0435\u0441\u044c \u2014 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u043a\u043b\u0430\u0434\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f: HA, RTO, RPO<\/h3>\n<p><strong>High Availability (HA)<\/strong> \u2014 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0437\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0437-\u0437\u0430 \u0430\u0432\u0430\u0440\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u0431\u0438\u0437\u043d\u0435\u0441 \u0445\u043e\u0447\u0435\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u0442\u043e \u00ab\u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u00bb \u2014 \u043e\u0431 \u044d\u0442\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 RTO.\u00a0<\/p>\n<p><strong>Recovery Time Objective<\/strong> <strong>(RTO)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0438 \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 RPO.\u00a0<\/p>\n<p><strong>Recovery Point Objective (RPO)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u043f\u043e\u0442\u0435\u0440\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u043e\u0438\u0442. <a href=\"https:\/\/habr.com\/ru\/companies\/veeam\/articles\/328068\/\"><u>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a (\u0425\u0430\u0431\u0440)<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<p>RTO \u0438 RPO \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0437\u043e\u043b\u043e\u0442\u0430\u044f \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0430, \u0442\u0435\u043c \u0434\u043e\u0440\u043e\u0436\u0435 \u043e\u043d\u0430 \u0441\u0442\u043e\u0438\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443 \u0438\u0437-\u0437\u0430 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430. \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0414 \u0437\u0430 1 \u043c\u0438\u043d\u0443\u0442\u0443, \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430: \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043f\u043b\u0430\u043d\u043e\u0432 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u043b\u044e\u0434\u0435\u0439. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u2014 \u0441 RPO.<\/p>\n<h3>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability<\/h3>\n<p>\u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e 3 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443. \u0414\u043b\u044f \u043d\u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 PostgreSQL, \u043d\u043e \u0443 \u043d\u0438\u0445 \u043c\u043d\u043e\u0433\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432.<\/p>\n<p><strong>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. <\/strong>\u041f\u0435\u0440\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043e\u0431\u0449\u0435\u0439 \u0421\u0425\u0414. \u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u043e\u0442\u043a\u0430\u0436\u0435\u0442, \u0412\u041c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0412\u041c \u0431\u0430\u0437\u044b. \u0412\u041c \u0441 \u0411\u0414 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 IO \u0421\u0425\u0414 (\u044d\u0444\u0444\u0435\u043a\u0442 \u00ab\u0448\u0443\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0430\u00bb),<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0449\u0438\u0442\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u0414\u0426,<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0441\u0442\u0440\u0430\u0445\u0443\u0435\u0442 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u041e\u0421 \u0438 \u0411\u0414,<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e\u0439: \u0438 \u043f\u043e \u0434\u0435\u043d\u044c\u0433\u0430\u043c, \u0438 \u043f\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0431\u0430\u0437\u0430. <\/strong>\u0414\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043f\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u0430\u0437\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432 \u0434\u0435\u043d\u044c. \u0418\u0437 \u043f\u043b\u044e\u0441\u043e\u0432 \u2014 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c RTO. <\/p>\n<p>\u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0437 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e,<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 RPO, \u0447\u0435\u043c \u043f\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043f\u0438\u0439 \u0431\u0430\u0437\u044b. <\/strong>\u0422\u0440\u0435\u0442\u044c\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0439\u0442\u0438 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u2014 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c Multi-Master, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0447\u0442\u0435\u043d\u0438\u044e \u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0438\u0437\u043a\u0438\u0435 RTO\/RPO \u2014 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0411\u0414 \u043e\u043d\u043b\u0430\u0439\u043d.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0430\u0440\u0438\u044f, \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f \u0411\u0414 \u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430, \u043d\u043e \u043d\u0435 \u043c\u0435\u0440\u0442\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0434\u043e\u0448\u0435\u0434\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u043e\u0445\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432 \u043b\u043e\u0431;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<h3>High Availability \u0432 PostgreSQL \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WAL-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438\u00a0<\/h3>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0431\u0435\u0437 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0411\u0414. \u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0430\u0437\u044b. \u0412 PostgreSQL \u0435\u0441\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 \u2014 Write-Ahead Log, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>Write-Ahead Logging (WAL)<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0416\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0414 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0441\u0431\u043e\u0439. \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0411\u0414 \u043e\u043d\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 WAL. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 WAL \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043f\u0440\u043e\u0439\u0434\u044f\u0441\u044c \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u044f\u043c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435.\u00a0<\/p>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/wal-intro.html\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e WAL \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 PostgreSQL \u2192<\/u><br \/><\/a><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/459250\/\"><u>\u0421\u0442\u0430\u0442\u044c\u044f WAL \u0432 PostgreSQL: \u0416\u0443\u0440\u043d\u0430\u043b \u043f\u0440\u0435\u0434\u0437\u0430\u043f\u0438\u0441\u0438 \u2192<\/u><\/a><\/p>\n<p><strong>\u0412 PostgreSQL 9.0+ \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 WAL<\/strong>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0436\u0434\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0433\u043e WAL-\u0444\u0430\u0439\u043b\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0421 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 WAL-\u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 Primary-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043f\u043b\u0438\u043a.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 PostgreSQL \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u2014 primary \u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0435, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 primary \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c WAL-\u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/15\/warm-standby\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0443\u044e WAL-\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u2192<\/u><\/a><\/p>\n<h3>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f High Availability \u0432 PostgreSQL<\/h3>\n<p>\u0412 PostgreSQL \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability.\u00a0<\/p>\n<ol>\n<li>\n<p><strong>repmgr<\/strong> (Replication Manager for PostgreSQL) \u2014 \u043f\u0438\u043e\u043d\u0435\u0440 \u0432 High Availability \u0434\u043b\u044f PostgreSQL. \u041d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 C \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u043a \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Witness-\u043d\u043e\u0434\u044b. <br \/><a href=\"https:\/\/github.com\/EnterpriseDB\/repmgr\"><u>repmgr \u043d\u0430 GitHub \u2192<\/u><\/a>\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Patroni<\/strong> \u2014\u00a0\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Python. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 DCS. \u0415\u0441\u0442\u044c REST API \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 k8s. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c PostgreSQL \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435. <br \/><a href=\"https:\/\/github.com\/zalando\/patroni\"><u>Patroni \u043d\u0430 GitHub \u2192<\/u><\/a>\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Stolon<\/strong> \u2014\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Golang \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 k8s. \u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:\u00a0<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>sentinel \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>keeper \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 PostgreSQL \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443,<\/p>\n<\/li>\n<li>\n<p>proxy \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a \u043a\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/sorintlab\/stolon\"><u>Stolon \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<ol start=\"4\">\n<li>\n<p><strong>Corosync + Pacemaker<\/strong>. \u0428\u0430\u0431\u043b\u043e\u043d HA \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<br \/><a href=\"https:\/\/github.com\/corosync\/corosync\"><u>Corosync \u043d\u0430 GitHub \u2192<\/u><br \/><\/a><a href=\"https:\/\/github.com\/ClusterLabs\/pacemaker\"><u>Pacemaker \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>PAF<\/strong> (PostgreSQL Auto Failover). \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f Corosync + Pacemaker.<br \/><a href=\"https:\/\/github.com\/ClusterLabs\/PAF\"><u>PAF \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>pg_auto_failover<\/strong>. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C. \u041f\u043e \u0434\u0443\u0445\u0443 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 repmgr.<br \/><a href=\"https:\/\/github.com\/hapostgres\/pg_auto_failover\"><u>pg_auto_failover \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>Bucardo<\/strong>. Perl-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e Multi-Master \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.<br \/><a href=\"https:\/\/github.com\/bucardo\/bucardo\"><u>Bucardo \u043d\u0430 GitHub \u2192<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><strong>EDB<\/strong> (aka 2ndQuandrant BDR). Enterprise-\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043e\u0431\u0435\u0449\u0430\u044e\u0449\u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c 99,99%+ \u0437\u0430 \u043a\u0443\u0447\u0443 \u0434\u0435\u043d\u0435\u0433.<br \/><a href=\"https:\/\/www.enterprisedb.com\/\"><u>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 EDB \u2192<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<h3>High Availability \u0432 \u0410\u0432\u0438\u0442\u043e: \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412\u043e\u0442 \u0441\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability:<\/p>\n<ol>\n<li>\n<p><strong>PostgreSQL 15<\/strong> \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>Patroni<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f High Availability \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Consul<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (Distributed Configuration Store, DCS) \u0434\u043b\u044f Patroni.\u00a0<\/p>\n<\/li>\n<li>\n<p><strong>Ceph<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>WAL-G<\/strong> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u044d\u043a\u0430\u043f\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 High Availability<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0436\u0435\u043b\u0435\u0437\u0430. \u0412 \u0410\u0432\u0438\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0411\u0414 \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043a\u0430\u0440\u0442, \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0430\u0445, \u0430 \u0435\u0449\u0451 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c RAID.\u00a0<\/p>\n<p><strong>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RTO \u0438 RPO<\/strong> \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p><code>loop_wait<\/code> <em>= 10 \u0441\u0435\u043a\u0443\u043d\u0434<\/em> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 DCS;<\/p>\n<\/li>\n<li>\n<p><code>retry_timeout<\/code><em> = 55 \u0441\u0435\u043a\u0443\u043d\u0434<\/em> \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 DCS;<\/p>\n<\/li>\n<li>\n<p><code>ttl<\/code> <em>= 2 \u043c\u0438\u043d\u0443\u0442\u044b<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0438\u0432\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043b\u0438\u0434\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p><code>master_start_timeout<\/code><em> = 2 \u043c\u0438\u043d\u0443\u0442\u044b<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0434\u0430\u0442\u044c \u043b\u0438\u0434\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u043e\u0442\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f;<\/p>\n<\/li>\n<li>\n<p><code>maximum_lag_on_failover<\/code> <em>= 160 \u041c\u0431<\/em> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 High Availability \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438:\u00a0<\/p>\n<ul>\n<li>\n<p>RTO \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435: 2 \u043c\u0438\u043d\u0443\u0442\u044b,<\/p>\n<\/li>\n<li>\n<p>RPO \u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435: 160 \u041c\u0431.<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/504044\/\"><u>\u0411\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043f\u0440\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 PostgreSQL-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u2192<\/u><\/a><\/p>\n<h3>\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 Split Brain<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 High Availability \u0437\u0430\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0442\u043e \u0431\u0435\u0437 \u0434\u043e\u043b\u0436\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440\u043e\u0432: primary, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0438\u0433\u0440\u0430\u043b\u0438 \u0433\u043e\u043d\u043a\u0443 \u0437\u0430 \u043a\u043b\u044e\u0447. \u041e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043b\u044f\u0436\u0435\u0442 \u0441\u0435\u0442\u044c. \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Split Brain, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u0437\u0433 \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 Split Brain \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0435\u0434\u0438\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0437 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.\u00a0<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 Split Brain, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0442\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0439 \u043b\u0438\u0434\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440\u043e\u0432. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0430\u0432\u0434\u044b.<\/p>\n<p><strong>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f Split Brain<\/strong> \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Patroni \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Consul (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 DCS):<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043a\u0430 \u0432 DCS TTL \u043b\u0438\u0434\u0435\u0440\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 WAL;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 DCS, \u0442\u043e \u0438 \u043b\u0438\u0434\u0435\u0440, \u0438 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0436\u0438\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 Consul \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b, \u0442\u043e \u043e\u043d \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 (\u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 Raft).<\/p>\n<\/li>\n<\/ul>\n<p><strong>Raft<\/strong> \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438 \u044f\u0432\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0434\u0435\u0440\u0430 \u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p><a href=\"http:\/\/thesecretlivesofdata.com\/raft\/\"><u>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Raft \u2192\u00a0<\/u><\/a><\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438<\/h3>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438<\/strong> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430:\u00a0<\/p>\n<ol>\n<li>\n<p>Patroni \u0443\u0437\u043d\u0430\u0435\u0442 \u043e \u043b\u0438\u0434\u0435\u0440\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0440\u0430\u0432\u0434\u044b \u2014 Consul.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0430 PostgreSQL \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u0437 \u0431\u044d\u043a\u0430\u043f\u0430 \u0432 Ceph.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0430 PostgreSQL \u0434\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0431\u044d\u043a\u0430\u043f\u043e\u0432 WAL.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430 \u0434\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043b\u0438\u0434\u0435\u0440\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f.<\/p>\n<p><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e<\/p>\n<p><strong>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 <\/strong>\u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435.<strong> <\/strong>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 Patroni \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c\/\u0437\u0430\u0431\u044b\u0442\u044c \u0435\u0451.<\/p>\n<h3>\u041e\u0442\u043a\u0430\u0437 \u043b\u0438\u0434\u0435\u0440\u0430<\/h3>\n<p>\u0412\u043e\u0442, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043c\u0435\u043d\u0430 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043e\u0442\u043a\u0430\u0437\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 High Availability \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u043f\u043b\u0438\u043a\u0438 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 DCS \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c <code>loop_wait<\/code> (10 \u0441\u0435\u043a\u0443\u043d\u0434), \u043e\u0436\u0438\u0434\u0430\u044f \u043e\u0442\u0432\u0435\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 <code>retry_timeout<\/code> (55 \u0441\u0435\u043a\u0443\u043d\u0434).<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0438\u0434\u0435\u0440 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0432 Consul \u0441\u043f\u0443\u0441\u0442\u044f ttl (2 \u043c\u0438\u043d\u0443\u0442\u044b) \u0438\u043b\u0438 PostgreSQL \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043f\u0443\u0441\u0442\u044f <code>master_start_timeout<\/code> (2 \u043c\u0438\u043d\u0443\u0442\u044b), \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0438\u0434\u0435\u0440 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u044b \u0441 \u0443\u0447\u0451\u0442\u043e\u043c <code>maximum_lag_on_failover<\/code> (160 \u041c\u0431) \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u0441\u0442\u0430\u043b\u0430\u00a0 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430 (\u043f\u0440\u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0440\u0430\u0432\u043d\u044b\u0445, \u0432\u044b\u0438\u0433\u0440\u0430\u0435\u0442 \u0442\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435).<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043b\u0438\u0434\u0435\u0440\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 High Availability \u0432 \u0410\u0432\u0438\u0442\u043e<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><strong>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/runtime-config-replication.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. \u0420\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/high-availability.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. High Availability<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/wal-intro.html\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f PostgreSQL. Write-Ahead Logging.<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/15\/warm-standby\"><u>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/u><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-361003","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=361003"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361003\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}