{"id":306554,"date":"2020-07-07T09:00:59","date_gmt":"2020-07-07T09:00:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306554"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-07-07T09:00:59","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306554","title":{"rendered":"\u0413\u043e\u0442\u043e\u0432\u0438\u043c PostgreSQL \u0432 \u044d\u043f\u043e\u0445\u0443 DevOps. \u041e\u043f\u044b\u0442 2\u0413\u0418\u0421. \u041f\u0430\u0432\u0435\u043b \u041c\u043e\u043b\u044f\u0432\u0438\u043d"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/509926\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0a\/t0\/r7\/0at0r7rgay2rdfpfglb5q4snmo8.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0432\u0435\u043b! \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e 2\u0413\u0418\u0421. \u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0436\u0438\u0442\u044c \u0432 \u0433\u043e\u0440\u043e\u0434\u0435. <\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/e3dMREDT0DA?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_1\/6r\/nk\/_16rnk8k2jfxyw3ftayvlsxszps.png\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u044e \u044f \u0432 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043c\u043e\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Infrastructure &amp; Operations, \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e IO. \u041c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0440\u0435\u0448\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qj\/j_\/7w\/qjj_7wgtti85pxmmntpulpqfga4.png\"><\/p>\n<p>  <\/p>\n<p>Stack, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e Kubernetes, \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043d\u0430 Golang, \u043d\u0430 Python, \u043d\u0430 Bash. \u0418\u0437 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Elasticsearch, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Cassandra \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Postgres, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u043c, \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_-\/9b\/6i\/_-9b6irrpjn39r0bnkghtntp5mk.png\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Postgres. \u0418 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0443 \u043d\u0430\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439: \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433, \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0438 \u0431\u044d\u043a\u0430\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430 production.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0439 \u0434\u043e\u043a\u043b\u0430\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043f\u0440\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Postgres, \u043d\u0435 \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 Postgres, \u0430 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0435\u0433\u043e. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2013 \u0431\u0435\u0440\u0435\u0448\u044c \u0438 \u0434\u0435\u043b\u0430\u0435\u0448\u044c, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435\u0442, \u0432\u0441\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nv\/nh\/d-\/nvnhd-_thbpoakjzc3uzkwkg5cy.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0423 \u043d\u0430\u0441 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0438\u0448\u0443\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430 PHP, Python \u0438 \u043d\u0430 Java Scala. \u041f\u043e\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u043a \u043d\u0430\u043c \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432\u043f\u043e\u043b\u0437\u043b\u0438 \u043c\u043e\u0434\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0442\u0438\u043f\u0430 Golang, \u0431\u0435\u0437 Node.js \u0442\u043e\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0438\u043a\u0443\u0434\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u043e FrontEnd.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Postgres. \u0411\u044b\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MySQL, Mongo, \u043d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0441\u043b\u043e\u043d \u0432\u0441\u0435\u0445 \u043f\u043e\u0431\u0435\u0434\u0438\u043b, \u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Postgres.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vc\/-u\/oc\/vc-uoczg4mdnnosyi9tea8vrbr4.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u0442\u0441\u044f DevOps, \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u044b \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e, \u0442. \u0435. \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441 Postgres. \u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u0435 Postgres, \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0430. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zz\/2q\/pq\/zz2qpqobm3-1uld4rekldhstmug.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0440\u0435\u043c\u044f \u0448\u043b\u043e, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e Postgres \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c, \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u0442\u043e\u043c \u0443 \u043d\u0430\u0441 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Kubernetes, \u043a\u043e\u0433\u0434\u0430 Kubernetes \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u0432 production-\u0441\u0442\u0430\u0434\u0438\u044e. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0430\u0437, \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 Postgres \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u043e\u043b\u043d\u043e\u0435 \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dp\/vr\/fy\/dpvrfy1hf11u7w4iph1jdncbwic.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0443 \u043d\u0430\u0441 \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Postgres \u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Ansible. \u041a\u0442\u043e-\u0442\u043e, \u0431\u043e\u043b\u0435\u0435 \u043e\u0442\u0432\u0430\u0436\u043d\u044b\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Chef, \u0443 \u043a\u043e\u0433\u043e \u0431\u044b\u043b \u0441 \u043d\u0438\u043c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2013 \u044d\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438, \u0437\u0430\u0431\u044b\u0442\u044c, \u043a\u0430\u043a \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 IO, \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u043c\u043e\u0449\u0438. <\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c Postgres. \u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0430 \u043d\u0430\u0441, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0438 \u043a \u043d\u0430\u043c, \u043c\u044b \u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u0423 \u043d\u0430\u0441 \u0434\u0430\u0436\u0435 \u0431\u044b\u043b\u0438 \u043e\u0441\u043e\u0431\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f. \u0412\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0430 9.4 Postgres \u0443\u043c\u0443\u0434\u0440\u044f\u043b\u0438\u0441\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c Postgres 8-\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1m\/fg\/g1\/1mfgg1jgenantindayjqn-f7c44.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441 \u044d\u0442\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0445\u0432\u0430\u0442\u0438\u0442 \u044d\u0442\u043e \u0442\u0435\u0440\u043f\u0435\u0442\u044c. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041a\u0438\u043d\u0443\u043b\u0438 \u043a\u043b\u0438\u0447 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438: \u00ab\u0427\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e?\u00bb. \u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043a \u0440\u0430\u0431\u043e\u0442\u0435, \u0442. \u0435. \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xc\/vt\/ns\/xcvtnsg1dcxunme8keaz1af4emi.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 production, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043f\u043b\u0438\u043a \u0438 \u043e\u043d\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043c\u0430\u0441\u0442\u0435\u0440 \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u043b\u0441\u044f autofailover \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u043e\u0447\u044c\u044e \u0443\u043f\u0430\u0434\u0435\u0442, \u043d\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0432\u044b\u043d\u043e\u0441 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0435 \u0442\u043e\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fn\/ja\/vg\/fnjavg_k4kizkhqoevoud5otlmq.png\"><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u044b \u0432 Postgres \u2013 \u0440\u0435\u0441\u0443\u0440\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0439. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c pooling, \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438, \u0442. \u0435. \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/si\/pb\/vvsipbxcz2lqf9deeqqbnremp_c.png\"><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0441 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u043e\u0439 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c point in time recovery. \u0418 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e WAL-\u0444\u0430\u0439\u043b\u043e\u0432. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/hq\/vd\/sfhqvdtp35bu3owzymvivzh1tg4.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ii\/vg\/79\/iivg79x0zb8vv2-k7vnyitd8vk8.png\"><\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b: infrastructure as code, \u0442\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043f\u043b\u043e\u044f. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043e\u0431\u0449\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435. \u0423 \u043d\u0430\u0441 \u044d\u0442\u043e \u0431\u044b\u043b Ansible. \u0418 \u0435\u0449\u0435 \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u043a\u043e\u0435-\u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 Python \u0438 Bash \u043c\u044b \u0442\u043e\u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c. <\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u0430\u044f, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043a\u043e\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0434\u0435\u043f\u043b\u043e\u0439 \u043c\u043e\u0433\u043b\u0430 \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430. \u041c\u043e\u0433\u043b\u0430 \u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u044b, \u043a\u043b\u044e\u0447\u0438, \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c inventory \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0431\u0435 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0422. \u0435. \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u00abdeploy\u00bb \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0443\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0438 \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/td\/dj\/om\/tddjominzei3ck80rgvzmbjdst0.png\"><\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 Gitlab, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Gitlab, \u0447\u0435\u0440\u0435\u0437 continuous integration, continuous delivery. \u0422. \u0435. \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u00abdeploy\u00bb \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0431\u044b \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. <\/p>\n<p>  <\/p>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0432\u0441\u0435 \u044d\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ge\/pv\/kz\/gepvkzjxhpwi49d1plv4bqfvxnq.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nl\/lx\/bn\/nllxbnnl_sps7wckzsqbssgv6jy.png\"><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 PostgreSQL 9.4. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 3,5 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434. \u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0431\u044b\u043b 9.4 \u0432 baseline. 9.6, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0448\u0435\u043b \u0438\u043b\u0438 \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e, \u044f \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043f\u043e\u043c\u043d\u044e. \u041d\u043e \u043c\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0438\u043b\u0438 \u0434\u043e 9.6, \u0442. \u0435. \u043e\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c. <\/li>\n<li>\u0414\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c. \u0412\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u2013 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u0443\u044e \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e. \u041e\u043d\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u0430\u044f, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f. \u0421 \u043d\u0435\u0439 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442. <\/li>\n<li>\u0414\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u0441\u0435\u0432\u0434\u043e HA. \u042d\u0442\u043e repmgr \u043e\u0442 2ndQuadrant. \u0412 \u0437\u0430\u0449\u0438\u0442\u0443 repmgr \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0434\u0432\u0430 \u0434\u043d\u044f \u0432 \u043d\u0435\u0433\u043e \u043b\u0435\u0442\u0435\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043a\u0430\u043c\u043d\u0438, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 HA, \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u0444\u0435\u043d\u0441\u0438\u043d\u0433\u0430, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0430 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u044f \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f failovers \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0422. \u0435. \u0432\u0441\u0435\u0433\u0434\u0430 repmgr \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u043e \u0434\u0435\u043b\u0443. \u0412\u0441\u0435\u0433\u0434\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u043b \u043d\u0430\u043c \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c. \u041d\u0435 \u0431\u0435\u0437 downtime, \u043a\u043e\u043d\u0435\u0447\u043d\u043e. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 2 \u043c\u0438\u043d\u0443\u0442\u044b repmgr \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c failover \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442. <\/li>\n<li>\u0414\u043b\u044f repmgr \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 failover_command. \u042d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e repmgr \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 failover, \u0442. \u0435. \u0437\u0430\u043f\u0440\u043e\u043c\u043e\u0443\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0430. \u0422. \u0435. \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u041e\u043d \u0438\u0434\u0435\u0442 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441 \u043d\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0430. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0422. \u0435. \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 failover, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0431\u044d\u043a\u0435\u043d\u0434\u044b \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430\u0445 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0430. \u0418 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u043c\u0430\u0441\u0442\u0435\u0440\u0443. <\/li>\n<li>\u0421 \u0440\u0435\u043f\u043b\u0438\u043a\u043e\u0439 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0414\u0426. \u0423 \u043d\u0430\u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u2013 \u044d\u0442\u043e \u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0414\u0426 \u0432 \u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0435 \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 repmgr. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0430\u044f, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438 ping\u2019\u0430, \u043b\u0430\u0433\u0438. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438. \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u0438 warning, \u0442. \u0435. \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0420\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043b\u0430\u0441\u044c. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o_\/rz\/qc\/o_rzqcgaqnpai-6izul2bdp0qo8.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443, \u0442. \u0435. \u043c\u044b \u0432\u044b\u0442\u0430\u0449\u0438\u043b\u0438 \u0438\u0437 repmgr \u043d\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u041c\u043e\u0441\u043a\u0432\u0435. \u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u0437 \u043d\u0438\u0445 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 hot standby, \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c. \u041e\u043d\u0438 \u0443 \u043d\u0430\u0441 \u0447\u0435\u0440\u0435\u0437 restore \u0437\u0430\u0431\u0438\u0440\u0430\u044e\u0442 \u0441 \u0431\u044d\u043a\u0430\u043f-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0430\u0440\u0445\u0438\u0432\u044b WALs. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043b\u0430\u0433\u0430 \u043c\u044b \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b\u0438. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430, \u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u043e\u0442\u0441\u0442\u0430\u044e\u0442. <\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043e\u043d\u0438 \u043e\u0442\u0441\u0442\u0430\u044e\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0442. \u0435. \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0418 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435, \u043e\u043d\u0438 \u0437\u043d\u0430\u044e\u0442, \u043e\u043d\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c. \u0418 \u0443 \u043d\u0438\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u0432\u0438\u0434\u0435 fallback \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0438\u0435 \u043d\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xt\/7a\/fo\/xt7afoixgau9q_jpfguwqdjnmhi.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u0441\u043e\u0431\u044b\u0445 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442. \u041f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443 \u043d\u0430\u0441 archive_command, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 rsync, \u0442. \u0435. \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0441 \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0430\u0440\u0445\u0438\u0432 \u0447\u0435\u0440\u0435\u0437 rsync ssh. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430, \u0442\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442. \u041d\u043e \u0441 \u044d\u0442\u0438\u043c \u043c\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u043c\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e \u0432 streaming \u0440\u0435\u0436\u0438\u043c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6j\/bj\/q_\/6jbjq_sri-ee5s51hfrqtf_fpog.png\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8z\/fs\/gw\/8zfsgwlqbajicnso_pkk91uotdq.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b. \u0423 \u043d\u0438\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0441\u0442\u043e\u0438\u0442 keepalive. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e keepalive \u0435\u0441\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440\u043e\u043c. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d keepalive \u043f\u0430\u0434\u0430\u0435\u0442, \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0439, \u0442. \u0435. \u0443 \u043d\u0435\u0433\u043e \u0434\u0432\u0430 \u0430\u0434\u0440\u0435\u0441\u0430. <\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 DNS \u0447\u0435\u0440\u0435\u0437 round robin, \u0442. \u0435. \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443, \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043b\u0438\u0431\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u043b\u0438\u0431\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 keepalive \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 PgBouncer. \u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 pooler, \u0443 \u043d\u0430\u0441 \u0441 \u043d\u0438\u043c \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0423 \u043d\u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0438 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435 Pgpool. \u041d\u0430\u043c \u043e\u043d \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u0437\u043d\u0430\u0435\u0442, \u0433\u0434\u0435 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440, \u0443\u043c\u0435\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u043d\u0430 slave.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sv\/dr\/qo\/svdrqodag7xmshka5dojlizpf84.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u043a\u043b\u0430\u0441\u0441\u043d\u043e, \u0445\u043e\u0440\u043e\u0448\u043e, \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0435\u0433\u043e \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a. <strong>\u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441 Pgpool \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041e\u043d \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043f\u0440\u0438\u0447\u0438\u043d \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u0437 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u0435\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043c\u043e\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u2013 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c, \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u0442. \u0435. \u043e\u043d \u043c\u043e\u0433 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c read only \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u043f\u0430\u043d\u0438\u043a\u0443 \u043d\u0430 \u043a\u043e\u0440\u0430\u0431\u043b\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e.<\/strong> <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_s\/kf\/3n\/_skf3nnmo1ht21brqf0orqqcyj0.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 Pgpool. PgBouncer \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440. \u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 PgBouncer\u2019\u0443 \u0431\u044d\u043a\u0435\u043d\u0434. \u0418 failover_command \u0441 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u044f\u0433\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 PgBouncer. \u0418 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c PgBouncer \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440. <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u0441\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0435 \u0443\u0448\u043b\u0430 \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438 Pgpool \u0431\u044b\u043b\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b slave. \u0410 \u0442\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c slave \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lk\/vu\/fe\/lkvufevcjpykve522lgifdlru64.png\"><\/p>\n<p>  <\/p>\n<p>\u0418 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c real only \u0442\u043e\u0447\u043a\u0438. \u0422. \u0435. \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0441 \u043d\u0435\u0433\u043e. <\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u0430\u0440\u0443. \u042f \u0442\u0443\u0442 \u043e\u0434\u0438\u043d \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0443\u0436\u0435 \u043d\u0435 \u0432\u043b\u0435\u0437\u0430\u043b. \u041c\u044b \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435 \u0443 PgBouncer \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 HAProxy, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u0433\u0434\u0435 \u0443 \u043d\u0435\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f slave \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e round robin \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043d\u0438\u0445. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c pooling \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0442. \u0435. \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0442\u0443\u043a\u0438 \u0442\u0438\u043f\u0430 Hikari Pool. \u0418, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u044b \u0434\u043b\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0436\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0j\/av\/cy\/0javcymhl1jea4ef1bnyvfvgzgs.png\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u043c\u0438 \u043a\u043e\u043f\u0438\u044f\u043c\u0438 \u043c\u044b \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c, \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gg\/f7\/_q\/ggf7_qjj6a0nf-yn3_zbc_9c6tm.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0437\u044f\u043b\u0438 Barman.<\/p>\n<p>  <\/p>\n<ul>\n<li>Barman \u0443 \u043d\u0430\u0441 \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u044d\u043a\u0430\u043f \u0431\u0430\u0437\u044b \u0447\u0435\u0440\u0435\u0437 cron \u043a\u0430\u0436\u0434\u044b\u0435 \u0434\u0432\u0430 \u0434\u043d\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f. <\/li>\n<li>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0447\u0435\u0440\u0435\u0437 archive_command \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044f WAL-\u0444\u0430\u0439\u043b\u043e\u0432 \u043a Barman, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e PITR \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u044d\u043a\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0445\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0447\u044c \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0430\u043f\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043b\u0438\u0431\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u044d\u043a\u0430\u043f, \u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439. \u0418 \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e WAL-\u0444\u0430\u0439\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e PITR \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u0431\u0430\u0437\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u0432 \u0431\u0430\u0437\u0443, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043c\u0435\u0442\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0443, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0431\u044d\u043a\u0430\u043f \u0435\u0441\u0442\u044c \u0438 \u0431\u044d\u043a\u0430\u043f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435: <\/p>\n<p>  <\/p>\n<ul>\n<li>\u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 archive_command.<\/li>\n<li>\u0418 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e WAL-\u0444\u0430\u0439\u043b\u044b \u043c\u044b \u043d\u0435 \u0441\u0436\u0438\u043c\u0430\u0435\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043c \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. <\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/34\/v0\/6s\/34v06scd0dnjavqglgldoim_t6m.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043b\u043e\u0433\u0438<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/em\/rv\/oe\/emrvoeqztgn2keo3wuu0mkluiki.png\"><\/p>\n<p>  <\/p>\n<ul>\n<li>\u0423 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Prometheus. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 pool-\u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a. \u0422. \u0435. \u043e\u043d \u0441\u0430\u043c \u0445\u043e\u0434\u0438\u0442 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0430 \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438) \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 exporter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 Prometheus, \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. <\/li>\n<li>\u041c\u044b \u0441\u0432\u043e\u0438 exporters \u043f\u0438\u0448\u0435\u043c \u043d\u0430 Golang, \u043d\u0430 Python, \u043d\u0430 Bash. <\/li>\n<li>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 exporters. \u042d\u0442\u043e <a href=\"https:\/\/github.com\/prometheus\/node_exporter\" rel=\"nofollow\">Node exporter<\/a> \u2013 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 exporter; <a href=\"https:\/\/github.com\/wrouesnel\/postgres_exporter\" rel=\"nofollow\">Postgres exporter<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 Postgres; exporter \u0434\u043b\u044f PgBouncer \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0430\u043c\u0438 \u043d\u0430 Python. \u0418 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0435\u0449\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 Cgroups exporters \u043d\u0430 Golang. \u041e\u043d \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0442\u043a\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u044b. <\/li>\n<li>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u044b \u0432\u0441\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: \u044d\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0442\u0438. <\/li>\n<li>\u0418 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0412 exporter\u2019\u0435 \u0434\u043b\u044f Postgres \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0430\u044f, \u0447\u0442\u043e \u0432\u044b \u0441\u0430\u043c\u0438 exporter\u2019\u0443 \u043f\u0438\u0448\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u0431\u0430\u0437\u0435. \u0418, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d \u0432\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u0445 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0422. \u0435., \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u044b\u0442\u044c \u0438\u0437 Postgres \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0435\u0439. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 tuples, \u043f\u043e\u0437\u0438\u0446\u0438\u044e WAL-\u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0435\u0441\u0442\u044c. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430\u0445. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0441\u0441\u0438\u0439 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u0435. \u0422. \u0435. \u0432\u0441\u0435-\u0432\u0441\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432 Prometheus. <\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d_\/y3\/bf\/d_y3bfpisrq9z9fr5zywwvkr2di.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u044b \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 Grafana. \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a Cgroups \u0441 exporter\u2019\u0430. \u041c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0431\u0430\u0437\u0430 \u0443 \u043d\u0430\u0441, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u043b\u0430 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442. \u0435. \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pv\/0i\/mq\/pv0imqd5azdomls0e3qag9w3qcq.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c alerts. Alerts \u0432 Prometheus \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f AlertManager. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/p5\/gz\/hi\/p5gzhi80udqi0oo_rszvxgouumo.png\"><\/p>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e alerts, \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0422. \u0435. \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0430\u0447\u0430\u043b\u0441\u044f failover, \u0447\u0442\u043e failover \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f, \u0447\u0442\u043e failover \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043b\u0438 \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0418 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c alerts, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0438\u0431\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u044f\u0442 \u043d\u0430\u043c \u0432 \u043f\u043e\u0447\u0442\u0443, \u043b\u0438\u0431\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u044f\u0442 \u0432 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 Slack, \u043b\u0438\u0431\u043e \u0437\u0432\u043e\u043d\u044f\u0442 \u043f\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443 \u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442: \u00ab\u041f\u0440\u043e\u0441\u044b\u043f\u0430\u0439\u0441\u044f, \u0443 \u0442\u0435\u0431\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430!\u00bb. <\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0431\u044d\u043a\u0430\u043f\u044b, \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u0430\u0437\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438, \u043c\u0438\u043c\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432, \u0442. \u0435. \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u0432\u0435\u0441\u044c \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0434\u043e \u0431\u0430\u0437\u044b. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u044d\u043a\u0430\u043f, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fz\/mg\/e2\/fzmge2kp5b36_6bqfsphef0kjqm.png\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u043b\u043e\u0433\u0430\u043c\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u0433\u0430\u0442\u043e. \u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ELK stack \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u043e\u0433\u043e\u0432, \u0442. \u0435. \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Elasticsearch, Kibana \u0438 LogStash. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, Postgres \u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u043b\u043e\u0433\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a \u0432 CSV-\u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0430 \u0441 \u0434\u0438\u0441\u043a\u0430 \u0438\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/python-beaver\/python-beaver\" rel=\"nofollow\">Python Beaver<\/a>. \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u041e\u043d \u0438\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438 \u043e\u0442\u0434\u0430\u0435\u0442 LogStash. LogStash \u043e\u0431\u043e\u0433\u0430\u0449\u0430\u0435\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0432 \u043e\u0431\u0449\u0435\u043c, \u0432\u043d\u043e\u0441\u0438\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 Kibana \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043b\u043e\u0433\u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432 \u043e\u0431\u0449\u0435\u043c, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0441 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c <a href=\"https:\/\/github.com\/darold\/pgbadger\" rel=\"nofollow\">Pgbadger<\/a>. \u042d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, slow \u043b\u043e\u0433\u0438. \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u044d\u0442\u0443 \u0448\u0442\u0443\u043a\u0443. \u041e\u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Perl. \u041e\u043d\u0430 \u043d\u0430\u043c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0434 \u043d\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c. \u041c\u044b \u0435\u0433\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u0434\u0432\u0438\u043d\u0443\u043b\u0438 \u0432 Kubernetes. \u041e\u043d \u0443 \u043d\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 Kubernetes. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u043d \u043b\u043e\u0433\u0438 \u0438\u0437 LogStash. LogStash \u043e\u0442\u0434\u0430\u0435\u0442 \u0435\u043c\u0443 \u043f\u043e HTTP \u043b\u043e\u0433\u0438 \u0438 \u0432 Pgbadger \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c, \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0433\u0440\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u0432\u044b\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qe\/bb\/sq\/qebbsqheuyh0b0lsinucwjenl0a.png\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u0434\u0435\u043f\u043b\u043e\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043f\u043b\u043e\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u044b\u043b \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c. <\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 Ansible. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u043c, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0435, \u043d\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. \u041c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043d\u0430\u0440\u0443\u0436\u0438 \u0441\u0430\u043c\u043e\u0433\u043e Postgres. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 Postgresql.conf, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435-\u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043f\u043b\u043e\u0439. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0447\u0435\u0442\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e, \u0438 \u043a\u0442\u043e \u0432\u043d\u043e\u0441\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7m\/zb\/kz\/7mzbkz7ag6rzk3vxc8lal4sadiy.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 Ansible. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 25 \u0440\u043e\u043b\u0435\u0439. \u0412\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0432\u044f\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u0438\u0445 \u0440\u043e\u043b\u0435\u0439, \u0442. \u0435. \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0412\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0434\u0435\u043f\u043b\u043e\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0440\u0436-\u0440\u0435\u043a\u0432\u0435\u0441\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0430 \u0443 \u043d\u0430\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0434\u043b\u044f \u043d\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u043a\u0443\u0434\u0430 \u0435\u0439 \u043d\u0443\u0436\u043d\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438. <\/p>\n<p>  <\/p>\n<p>20 \u0440\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0430\u043c\u0438. 12 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u044b\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u043c\u0438, \u0442. \u0435. \u044d\u0442\u043e \u0440\u043e\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f. \u0418 \u043e\u043d\u0438 \u043e\u0441\u043e\u0431\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u0434\u0435\u043f\u043b\u043e\u0435, \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. <\/p>\n<p>  <\/p>\n<p>\u0418 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0440\u043e\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0422. \u0435. \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043c\u044b \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0420\u043e\u0441\u043a\u043e\u043c\u043d\u0430\u0434\u0437\u043e\u0440 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u041e\u043d \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u0430\u043d\u0438\u0442 \u0445\u043e\u0441\u0442\u044b GitHub, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0442\u0430\u0449\u0438\u0442\u044c \u0440\u043e\u043b\u0438 \u0441\u043d\u0430\u0440\u0443\u0436\u0438. \u0418 \u0432\u0441\u0435 \u0440\u043e\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043b\u0435\u0436\u0430\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c Ansible. \u042d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0422. \u0435. \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u0434\u0435\u043f\u043b\u043e\u0435 \u0435\u0441\u0442\u044c testing, production \u0438 staging. \u041f\u043e\u0434 staging \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0447\u0442\u0438 production, \u043d\u043e \u0431\u0435\u0437 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c Ansible \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u0432\u0430-\u0442\u0440\u0438 testing, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0444\u0438\u0447\u0443, \u0442\u043e \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 environments, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u00abdeploy\u00bb. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u041a\u043b\u044e\u0447\u0438, \u043f\u0430\u0440\u043e\u043b\u0438 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u0445. \u0428\u0438\u0444\u0440\u0443\u0435\u043c \u0432\u0441\u0435 <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/user_guide\/vault.html\" rel=\"nofollow\">Ansible Vault<\/a>. \u042d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0432 Ansible \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Ubuntu Linux \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0442\u043e \u0432\u0441\u0435 \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043c\u044b \u043f\u0430\u043a\u0435\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043a \u0441\u0435\u0431\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 apt. \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0420\u043e\u0441\u043a\u043e\u043c\u043d\u0430\u0434\u0437\u043e\u0440 \u0441\u043d\u043e\u0432\u0430 \u0440\u0435\u0448\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u0431\u0430\u043d\u0438\u0442\u044c \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043f\u043b\u043e\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. <\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0422. \u0435. \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 real only \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0442\u0443\u043a \u0432 \u0431\u0430\u0437\u0443, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0432 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043e\u0434\u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443, \u0434\u0440\u0443\u0433\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u044b prepared statements, \u0430 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0441\u0430\u043c bootstrap \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0412\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f\u0438\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u041e\u043d \u0447\u0438\u0441\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435. \u0422\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0435\u0441\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043f\u043b\u043e\u0439 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e \u0443 \u0432\u0430\u0441 \u043e\u043f\u044f\u0442\u044c \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0422. \u0435. \u043f\u0440\u043e \u044d\u0442\u0438 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430\u0434\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c. \u041e\u043d\u0438 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. <\/p>\n<p>  <\/p>\n<p>\u0414\u0435\u043f\u043b\u043e\u0439 \u0443 \u043d\u0430\u0441 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0432\u0438\u0434\u0435 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0432 \u043d\u0430\u0448\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c Gitlab.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0432\u0435\u0442\u043a\u0430\u0445. \u042d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 workflows. \u0418\u0437 \u0432\u0435\u0442\u043e\u043a \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u043c. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0440\u0436-\u0440\u0435\u043a\u0432\u0435\u0441\u0442. \u042d\u0442\u043e \u043c\u0435\u0440\u0436 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a \u0432 \u043c\u0430\u0441\u0442\u0435\u0440. \u041f\u043e \u043d\u0430\u0448\u0438\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0432 \u043c\u0435\u0440\u0436-\u0440\u0435\u043a\u0432\u0435\u0441\u0442 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043b\u044e\u0434\u0438, \u0442. \u0435. \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043b\u0438\u0431\u043e \u0447\u043b\u0435\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043b\u0438\u0431\u043e \u0447\u043b\u0435\u043d\u044b \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0435, \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043e \u0447\u0435\u043c \u0438\u0434\u0435\u0442 \u0440\u0435\u0447\u044c. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u0435\u0440\u0436 \u043e\u0434\u043e\u0431\u0440\u044f\u0435\u0442\u0441\u044f, \u043e\u043d \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0442\u0435\u0440. \u0418 \u0438\u0437 \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0435\u043f\u043b\u043e\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432 OpenStack. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043a\u0443\u0447\u0430 \u0442\u0435\u0441\u0442\u0438\u043d\u0433\u043e\u0432. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 Openstack API \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0443\u043b\u044c Ansible, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0448\u0442\u0443\u043a\u0443 \u0432 OpenStack, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f heat-api, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0442\u0443\u043a. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u044d\u0442\u0443 \u043e\u0431\u0432\u044f\u0437\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 heat-api \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043a\u0438. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0435 \u0441\u0435\u0431\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0421 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435. \u041f\u043e\u0441\u043b\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435: \u00ab\u041c\u043d\u0435 \u044d\u0442\u043e \u043d\u0435 \u043d\u0430\u0434\u043e. \u0423\u0434\u0430\u043b\u0438\u0442\u044c\u00bb. \u042d\u0442\u043e \u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f, \u0442. \u0435. \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u043a\u0438 \u0432 OpenStack \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f. \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0436\u0435\u043b\u0435\u0437\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 bootstrap, \u043d\u043e \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0440\u0435\u0441\u0435\u0442 \u043e\u0431\u0440\u0430\u0437. \u042d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c Debian, Ubuntu. \u041e\u043d \u0437\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0423 \u043d\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u043d\u044e. \u0417\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u043e \u0434\u0438\u0441\u043a, \u043f\u0440\u043e \u0441\u0435\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0432\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0435\u043f\u043b\u043e\u0435. \u0422. \u0435. \u0432\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 \u0435\u0435 \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439, \u0438 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pz\/em\/9o\/pzem9opfymbg1svbapt_5_cplbs.png\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432 \u0434\u0435\u043f\u043b\u043e\u0439 \u043c\u044b \u0432\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u044b. \u0422\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 Ansible. \u0422\u0435\u0441\u0442\u044b \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435, \u0442. \u0435. \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0422\u0435\u0441\u0442\u044b \u0443 \u043d\u0430\u0441 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u041f\u043e\u0442\u043e\u043c \u0435\u0433\u043e \u043b\u043e\u043c\u0430\u044e\u0442. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u0447\u0442\u043e \u043c\u0430\u0441\u0442\u0435\u0440 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u044d\u043a\u0430\u043f, \u0447\u0442\u043e \u0431\u0430\u0437\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0442. \u0435. \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oe\/vk\/ul\/oevkulk91xnfhpzddqwk3m0ew8m.png\"><\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Gitlab.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bn\/en\/eb\/bnenebdwdakyexcwq9-mritwhey.png\"><\/p>\n<p>  <\/p>\n<p>Gitlab \u0443\u043c\u0435\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 jobs. Jobs \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ce\/xc\/un\/cexcunekdcxuam-qmvjn2kpas1m.png\"><\/p>\n<p>  <\/p>\n<p>\u0422. \u0435. \u0443 \u043d\u0430\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f syntax check, \u0434\u0435\u043f\u043b\u043e\u0439, \u0442\u0435\u0441\u0442\u044b. \u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430. \u041f\u043e\u0441\u043b\u0435 \u043c\u0435\u0440\u0436\u0430 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f pipeline, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 syntax check, \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u043d\u0433. \u041d\u0430 \u0442\u0435\u0441\u0442\u0438\u043d\u0433\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 Ok, \u0432\u0441\u0435 \u0437\u0435\u043b\u0435\u043d\u043e\u0435, \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u0435\u043f\u043b\u043e\u044f staging \u0438 \u0434\u0435\u043f\u043b\u043e\u044f production.<\/p>\n<p>  <\/p>\n<p>\u0420\u0443\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0443 \u043d\u0430\u0441 \u0441\u0434\u0435\u043b\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043b\u044e\u0434\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442, \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0438 \u043e\u0442\u0447\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 testing \u0438\u043b\u0438 \u043d\u0430 staging \u0438\u043b\u0438 \u043d\u0430 production.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lh\/yy\/ob\/lhyyobu3qtemwuh8lzmm9ubhw74.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438. \u0427\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c? \u041c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c \u0432\u0441\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043d\u0430\u043c \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c. \u0422\u0430\u043a\u043e\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438. \u041d\u0430\u043c \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u0445 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 15 \u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u00abdeploy\u00bb, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 endpoint \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 pipeline, \u0442. \u0435. \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dt\/km\/bm\/dtkmbmdawuul7zu3s0pfnb93e-4.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041d\u0430\u0441 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043f\u043b\u043e\u0439. \u0412\u0440\u0443\u0447\u043d\u0443\u044e \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c. \u042f \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0445 \u0421\u0423\u0411\u0414 \u043c\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c Postgres, \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043c\u044b. \u041c\u044b \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c, \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0440\u0435\u0431\u044f\u0442\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043b\u0438\u0441\u044c, \u043e\u043d\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043e\u043f\u044b\u0442. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 rep managers, \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430, \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f, Postgres. \u042d\u0442\u043e \u043d\u0435\u043e\u0446\u0435\u043d\u0438\u043c\u044b\u0439 \u043e\u043f\u044b\u0442, \u0432\u0441\u0435\u043c \u0441\u043e\u0432\u0435\u0442\u0443\u044e. <\/p>\n<p>  <\/p>\n<p>Failover \u0443 \u043d\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. Failover, \u044f \u0431\u044b \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0430\u0441\u0442\u043e. \u0417\u0430 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0435\u0441\u044f\u0442\u0438 \u0440\u0430\u0437 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b failover. Failover \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e \u0434\u0435\u043b\u0443 \u0431\u044b\u043b. <\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e switchover, \u0442. \u0435. \u044d\u0442\u043e failover \u0432\u0440\u0443\u0447\u043d\u0443\u044e. Switchover \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0448\u0442\u0443\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0414\u0426 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f\u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u043e\u0434\u0443 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0414\u0426. \u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0430 \u043d\u0435\u0435 switchover, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432 \u043d\u043e\u0432\u043e\u043c \u0414\u0426 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 downtime, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0410 \u0434\u043b\u044f repmgr (Replication <em>Manager<\/em>) \u2013 \u044d\u0442\u043e, \u043f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0434\u0432\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s8\/fk\/dm\/s8fkdmcvb-p0m1jcdwrzttzjivu.png\"><\/p>\n<p>  <\/p>\n<p>\u0411\u0435\u0437 falls \u0443 \u043d\u0430\u0441 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0433\u043b\u0438 \u0435\u0433\u043e \u0441\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0442\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0448\u043b\u043e. \u0412\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0430\u0434\u043e \u0437\u043d\u0430\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b, \u043a\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438, \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 rep managers. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043e\u0440\u043a\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u044d\u0442\u0438\u043c. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u044d\u0442\u043e \u0438 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u044b \u0431\u044b \u0440\u0435\u0448\u0430\u043b\u0438. <\/li>\n<li>\u0412\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c. \u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0434\u0435\u043f\u043b\u043e\u0439. <\/li>\n<li>\u0418 \u043e\u0442 \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u0412\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u044b, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0438 Postgres, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 postgresql.conf, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0411\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442. \u0411\u0435\u0437 \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. <\/li>\n<li>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0431\u043e\u043b\u044c. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435 \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0438\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 downtime. \u0410 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 downtime. <\/li>\n<li>\u0418 \u043c\u044b \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438, \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f pushes \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. <\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ej\/ce\/ri\/ejceripxwkpsqotpxkdrk3yurq4.png\"><\/p>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f Kubernetes, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u043e\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0439 Postgres \u0432 Kubernetes. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 Stolon, Patroni. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c, \u0447\u0435\u043c \u043c\u044b \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0448\u0442\u0443\u043a\u0443 \u0431\u0435\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0442. \u0435. \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0448\u0443\u0442\u043a\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0434\u0435\u043f\u043b\u043e\u0435, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c, \u0438 \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0431\u044d\u043a\u0430\u043f, \u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. <\/p>\n<p>  <\/p>\n<p>\u0418 \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043f\u0433\u0440\u0435\u0439\u0434 \u043d\u0430 PostgreSQL 10-11. \u042f \u043f\u0440\u0435\u0434\u0432\u0438\u0436\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u00ab\u0432\u0435\u0441\u0435\u043b\u043e\u0435\u00bb \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435. \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u043d\u044f\u0442, \u0443 \u043d\u0430\u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0435\u0442, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0438\u0442\u044c\u0441\u044f. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/th\/ef\/dc\/thefdcebgo31nhmzpfuqp_jxuh4.png\"><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fr\/2d\/vl\/fr2dvlm1znxvg6ybg-knsutwj-4.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u044b<\/p>\n<p>  <\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0434\u043e\u043a\u043b\u0430\u0434! \u041d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0441\u0435\u0445 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u0432 \u0432 Ansible, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438?<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u0443\u0442\u0435\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a, \u043f\u0443\u0442\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u0432\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0434\u0432\u0430-\u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0437\u0430\u043d\u044f\u043b\u043e. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0431\u044b\u043b\u043e 2-3 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. <\/p>\n<p>  <\/p>\n<p><em>\u041a\u0430\u043a\u0438\u0435-\u0442\u043e \u0431\u044b\u043b\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f Ansible \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Postgres, \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c?<\/em><\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f Ansible?<\/p>\n<p>  <\/p>\n<p><em>\u0414\u0430.<\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0442, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Ansible, \u0442. \u0435. \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0435\u0433\u043e \u0438\u0434\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u0438. <\/p>\n<p>  <\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0434\u043e\u043a\u043b\u0430\u0434! \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430 Barman \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c? \u0418 \u043d\u0430\u0441\u0447\u0435\u0442 \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u0441\u043e\u0437\u0440\u0435\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u0435\u0449\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e 9.6 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438. \u042f \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u044b \u043d\u0430 10 \u0438 11 \u0432\u0435\u0440\u0441\u0438\u044e, \u0434\u0430?<\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0435 \u0437\u043d\u0430\u044e, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c Barman. \u041e\u043d \u043d\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0422. \u0435. \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0440\u043e\u043b\u044c \u0432 Ansible. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 WAL-G. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, WAL-G \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432 \u0434\u0438\u0441\u043a (\u0423\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435: \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a). \u0410 \u0443 \u043d\u0430\u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u044d\u043a\u0430\u043f\u044b \u0438 \u0432\u0441\u0435-\u0432\u0441\u0435 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0410 \u0433\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 S3, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0437\u0430\u0447\u0435\u043c?<\/p>\n<p>  <\/p>\n<p>\u0410\u043f\u0433\u0440\u0435\u0439\u0434 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0435\u043f\u043b\u043e\u0438\u043b\u0438 \u0440\u044f\u0434\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 9.6. \u0412 \u043d\u0435\u0433\u043e \u0441\u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u0441\u0435. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u043b\u0438 9.4 \u0438 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0441\u0442\u0430\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e. <\/p>\n<p>  <\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u0430 \u0434\u043e\u043a\u043b\u0430\u0434! \u0412\u044b \u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u041d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0445\u043e\u0434\u0443 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0434\u0430?<\/em><\/p>\n<p>  <\/p>\n<p>\u0414\u0430.<\/p>\n<p>  <\/p>\n<p><em>\u041f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043c\u0438\u043c\u043e staging?<\/em><\/p>\n<p>  <\/p>\n<p>\u042f \u043f\u043e\u043d\u044f\u043b \u0432\u043e\u043f\u0440\u043e\u0441. \u041c\u044b \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 \u0442\u0440\u0435\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0432\u043e\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445. \u0423 \u043d\u0430\u0441 \u0442\u0430\u043c \u0435\u0441\u0442\u044c testing, staging. \u0418 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u0436\u0435 \u043d\u0430 staging, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e\u2026. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u043e\u0432\u044b\u0435 \u0431\u0430\u0437\u044b, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b. \u0418 \u0442\u0430\u043a\u043e\u0435 \u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0437\u0430\u0447\u0435\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 WALs, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u044d\u043a\u0430\u043f. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0431\u044d\u043a\u0430\u043f \u043f\u0440\u0438\u0448\u0435\u043b, \u043f\u043e\u043a\u0430 \u0443 \u0442\u0435\u0431\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u043b\u0435\u0436\u0438\u0442, \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u2026. \u0418, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043f\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0430\u0435\u043c \u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u044d\u0442\u0438\u043c \u0440\u0435\u0431\u044f\u0442\u0430\u043c. \u0418 \u0434\u0435\u043f\u043b\u043e\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0430 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c? \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 production \u0432\u0441\u0435.<\/p>\n<p>  <\/p>\n<p><em>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435! \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0434\u043e\u043a\u043b\u0430\u0434! \u0423 \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u0412\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0447\u0430\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 Postgres?<\/em><\/p>\n<p>  <\/p>\n<p>\u0414\u0430.<\/p>\n<p>  <\/p>\n<p><em>\u042f \u0441\u0435\u0439\u0447\u0430\u0441 \u0442\u043e\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u043f\u0440\u0438\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0441\u044c \u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Postgres Professional, \u0442. \u0435. Postgres Pro Standard. \u0418 \u043a\u043e\u0441\u043d\u0443\u043b\u0430\u0441\u044c \u0442\u0435\u043c\u0430, \u0447\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0430 pg_probackup, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Barman, \u043d\u043e \u0443 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u044d\u043a\u0430\u043f\u043e\u0432 \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438. \u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u044b \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u0443?<\/em><\/p>\n<p>  <\/p>\n<p>\u042f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e, \u043a\u0430\u043a \u0432\u0430\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u044b \u043a\u0430\u043a-\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 Postgres Pro\u2019\u0448\u043d\u044b\u0435 \u0448\u0442\u0443\u043a\u0438. \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0447\u0442\u043e \u043c\u044b \u0441\u0430\u043c\u0438 \u0441 \u0443\u0441\u0430\u043c\u0438, \u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0432\u043e\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. <\/p>\n<p>  <\/p>\n<p><em>\u0422. \u0435. \u044d\u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e: \u043b\u0438\u0431\u043e \u0433\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u043b\u0438\u0431\u043e \u043f\u043e\u0439\u0442\u0438 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u0440\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/em> <\/p>\n<p>  <\/p>\n<p>\u0414\u0430. <\/p>\n<p>  <\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/em><\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435!<\/p>\n<\/div>\n<p> \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\/post\/509926\/\"> https:\/\/habr.com\/ru\/post\/509926\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/509926\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0a\/t0\/r7\/0at0r7rgay2rdfpfglb5q4snmo8.png\"><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0432\u0435\u043b! \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e 2\u0413\u0418\u0421. \u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0436\u0438\u0442\u044c \u0432 \u0433\u043e\u0440\u043e\u0434\u0435. <\/p>\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-306554","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306554","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=306554"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306554\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}