{"id":303909,"date":"2020-05-20T09:00:42","date_gmt":"2020-05-20T09:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=303909"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=303909","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u0431\u0430\u0437\u0443 PostgreSQL \u2014 \u043a\u0442\u043e \u0432\u0438\u043d\u043e\u0432\u0430\u0442, \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c"},"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\/company\/tensor\/blog\/502478\/\">\u042f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b, <a href=\"https:\/\/habr.com\/ru\/post\/487380\/\">\u043a\u0430\u043a \u043c\u044b \u00ab\u043b\u043e\u0432\u0438\u043c\u00bb \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b PostgreSQL<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0441\u043e\u0442\u043d\u044f\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041d\u043e \u0432\u0435\u0434\u044c \u043a\u0440\u043e\u043c\u0435 \u043b\u043e\u0433\u043e\u0432, \u044d\u0442\u0430 \u0421\u0423\u0411\u0414 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0435\u0449\u0435 \u0438 <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/monitoring-stats#MONITORING-STATS-VIEWS\">\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/a> \u2014 \u0433\u0440\u0435\u0445 \u0438\u043c\u0438 \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043a\u043e\u0441\u0435\u0442\u044c \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u044c\u0437\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u044b.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s1\/za\/d-\/s1zad-d3claa2klkewtgrj8zdaa.png\"><\/div>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u0441\u0435 \u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439, \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/tensor\/blog\/328920\/\">\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0430\u0434 Zabbix<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043a\u0440\u0430\u043d\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u0442 <b>\u0435\u0434\u0438\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/b> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0431\u0430\u0437 \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u0430\u0437 PostgreSQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0438 \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439<\/h2>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0440\u0430\u0437\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0441\u0435\u0439\u0447\u0430\u0441\/\u0431\u044b\u043b\u043e \u043f\u043b\u043e\u0445\u043e\u00bb \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u0441\u0432\u043e\u0434\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/monitoring-stats#PG-STAT-ACTIVITY-VIEW\">pg_stat_activity<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/az\/zv\/9k\/azzv9kl_xmnaxjdfgsgjkmikr48.png\"><\/p>\n<p>  \u041d\u0430 \u043b\u0435\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u0436\u0434\u0443\u0442, \u043d\u0430 \u043f\u0440\u0430\u0432\u043e\u043c \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 PG \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e <code>pg_stat_activity.state\/wait_event<\/code> \u0438\/\u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0441\u0430\u043c\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <b>\u041d\u0430 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/b>:<\/p>\n<ul>\n<li>\u0421\u043b\u0438\u0448\u043a\u043e\u043c <b>\u043c\u0430\u043b\u043e <code>idle<\/code><\/b> \u2014 \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043c\u043e\u0436\u0435\u0442 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0443\u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a \u0431\u0430\u0437\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0438 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0432\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u0442\u0435 \u043d\u0430 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430.<\/li>\n<li>\u0421\u043b\u0438\u0448\u043a\u043e\u043c <b>\u043c\u043d\u043e\u0433\u043e <code>idle<\/code><\/b> \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u043e\u0439 \u0440\u043e\u0441\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u00ab\u0443\u0442\u0435\u0447\u043a\u0443\u00bb \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044e \u043b\u0438\u043c\u0438\u0442\u0430 <code>max_connections<\/code>.<\/li>\n<li><b>\u041c\u043d\u043e\u0433\u043e <code>idle in transaction<\/code><\/b> \u2014 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0438\u043b\u0438 pgbouncer. \u0422\u043e \u0435\u0441\u0442\u044c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0411\u0414 \u0432\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043e\u0442\u043a\u0440\u044b\u043b\u0438 \u0438 \u0443\u0448\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u0443\u0440\u0438\u0442\u044c.\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0438 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u043a \u0440\u043e\u0441\u0442\u0443, \u0441\u0442\u043e\u0438\u0442 <b>\u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439<\/b> \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0430 \u043f\u043e\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>idle_in_transaction_session_timeout<\/code>.<\/li>\n<li><b>\u0420\u0430\u0441\u0442\u0443\u0442 <code>wait<\/code><\/b> \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u0433\u043e-\u0442\u043e \u00ab\u0443\u043f\u0435\u0440\u043b\u043e\u0441\u044c\u00bb \u043d\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0430\u044f \u0440\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f \u2014 \u043f\u043e\u0432\u043e\u0434 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435.\n<p>  \u0415\u0441\u043b\u0438 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0440\u0430\u0441\u0442\u0435\u0442, \u0442\u043e <b>\u0441\u0442\u043e\u0438\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u00ab\u043f\u0440\u0438\u0431\u0438\u0442\u044c\u00bb \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a\u0430<\/b> \u0447\u0435\u0440\u0435\u0437 <code>pg_terminate_backend(pid)<\/code>.<\/li>\n<li><b>\u041f\u0438\u043a\u0438 <code>active<\/code><\/b> (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e max-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435) \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u0438\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u00ab\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u00bb. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043a\u0438\u043d\u0443\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044c\u00bb) \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a, \u0440\u0432\u0430\u043d\u0443\u043b\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0447\u0438\u0442\u0430\u0442\u044c\u2026\n<p>  \u041d\u0435 \u043d\u0430\u0434\u043e \u0442\u0430\u043a \u2014 \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u0447\u0442\u043e\u0431\u044b <a href=\"https:\/\/habr.com\/ru\/post\/497008\/\">\u00ab\u0440\u0430\u0437\u043c\u0430\u0437\u0430\u0442\u044c\u00bb \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/a>.<\/li>\n<li><b><code>maintenance<\/code><\/b> \u2014 \u044d\u0442\u043e \u0432\u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0435:<br \/> \n<pre><code class=\"plaintext\">query ~* E'^(\\\\s*(--[^\\\\n]*\\\\n|\/\\\\*.*\\\\*\/|\\\\n))*(autovacuum|VACUUM|ANALYZE|REINDEX|CLUSTER|CREATE|ALTER|TRUNCATE|DROP)'<\/code><\/pre>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 autovacuum\/autoanalyze, \u0432\u0440\u0435\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0432 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u00ab\u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435\u00bb \u0434\u0435\u043b\u0430. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 \u044d\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u2014 \u043f\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u0435 <code>autovacuum_max_workers<\/code> \u0438 <code>autovacuum_naptime<\/code>, \u043d\u043e <a href=\"https:\/\/habr.com\/ru\/post\/501516\/\">\u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u2014 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442<\/a>.<\/p>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 <b>\u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0440\u0430\u0441\u0442\u0438 <code>wait<\/code> \u0438 <code>maintenance<\/code><\/b>, \u0442\u043e \u044d\u0442\u043e \u043f\u043e\u0432\u043e\u0434 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0435 \u0440\u0435\u0448\u0438\u043b \u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0438\u0437 DBA \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430\u043a\u0430\u0442\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e \u0441\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u0440\u0438\u043a, \u043d\u043e \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">WITH event_types(wait_event_type) AS(   VALUES     ('lwlock')   , ('lock')   , ('bufferpin')   , ('client')   , ('extension')   , ('ipc')   , ('timeout')   , ('io') ) , events(wait_event) AS(   VALUES     ('walwritelock')   , ('wal_insert')   , ('buffer_content')   , ('buffer_io')   , ('lock_manager')   , ('relation')   , ('extend')   , ('page')   , ('tuple')   , ('transactionid')   , ('virtualxid')   , ('speculative token')   , ('object')   , ('userlock')   , ('advisory')   , ('clientread')   , ('datafileextend')   , ('datafileread')   , ('datafilewrite')   , ('slruread')   , ('slruwrite') ) , states(state) AS(   VALUES     ('running')   , ('maintenance')   , ('waiting')   , ('transaction')   , ('idle') ) , stats AS(   SELECT     pid   , datname   , state   , lower(wait_event_type) wait_event_type   , lower(wait_event) wait_event   , query   FROM     pg_stat_activity   WHERE     pid &lt;&gt; pg_backend_pid() ) , dbs AS(   SELECT     datname   FROM     pg_database db   WHERE     NOT db.datistemplate )   SELECT     date_part('epoch', now())::integer ts   , coalesce(s.qty, 0) val   , dbs.datname dbname   , states.state   , true total   FROM     dbs   CROSS JOIN     states   NATURAL LEFT JOIN     (       SELECT         datname       , CASE           WHEN query ~* E'^(\\\\s*(--[^\\\\n]*\\\\n|\/\\\\*.*\\\\*\/|\\\\n))*(autovacuum|VACUUM|ANALYZE|REINDEX|CLUSTER|CREATE|ALTER|TRUNCATE|DROP)' THEN             'maintenance'           WHEN wait_event IS NOT NULL AND             wait_event &lt;&gt; 'clientread' AND             state = 'active' THEN             'waiting'           WHEN state = 'active' THEN             'running'           WHEN state = 'idle' THEN             'idle'           WHEN state IN ('idle in transaction', 'idle in transaction (aborted)') THEN             'transaction'           WHEN state = 'fastpath function call' THEN             'fastpath'           ELSE             'disabled'         END state       , count(*) qty       FROM         stats       GROUP BY         1, 2     ) s UNION   SELECT     date_part('epoch', now())::integer ts   , coalesce(t.qty, 0) val   , dbs.datname dbname   , event_types.wait_event_type   , false total   FROM     dbs   CROSS JOIN     event_types   NATURAL LEFT JOIN     (       SELECT         datname       , wait_event_type       , count(*) qty       FROM         stats       WHERE         wait_event_type IS NOT NULL       GROUP BY         1, 2     ) t UNION   SELECT     date_part('epoch', now())::integer ts   , coalesce(e.qty, 0) val   , dbs.datname dbname   , events.wait_event   , false total   FROM     dbs   CROSS JOIN     events   NATURAL LEFT JOIN     (       SELECT         datname       , wait_event       , count(*) qty       FROM         stats       WHERE         wait_event IS NOT NULL       GROUP BY         1, 2     ) e; <\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2>\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/h2>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u043c\u044b \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e PostgreSQL \u043b\u044e\u0431\u0438\u0442 \u0438\u0445 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u0438 \u043d\u0430\u043b\u0435\u0432\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nz\/jl\/vd\/nzjlvdmvxaaqxdotpshnyuhydlo.png\"><\/p>\n<p>  \u041d\u0430\u0441 \u0438\u0437 \u043d\u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430:<\/p>\n<ul>\n<li><b><code>Exclusive<\/code><\/b> \u2014 \u0442\u0438\u043f\u0438\u0447\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/li>\n<li><b><code>AccessExclusive<\/code><\/b> \u2014 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 maintenance-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439.<\/li>\n<\/ul>\n<p>  \u041d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/runtime-config-locks\">\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u2014 \u043d\u0435 \u0440\u0435\u0437\u0438\u043d\u043e\u0432\u043e\u0435<\/a>:<\/p>\n<blockquote><p>\u0418 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>max_locks_per_transaction<\/code> \u0438 <code>max_connections<\/code>. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a <b>\u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0442\u044c <u>\u043d\u0438\u043a\u0430\u043a\u0443\u044e<\/u> \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443<\/b>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0445 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441\u043e\u0442\u043d\u044f\u043c\u0438 \u0442\u044b\u0441\u044f\u0447 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p><\/blockquote>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u00ab\u0442\u0435\u043a\u0443\u0442\u00bb \u0438 \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u044b: \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/488024\/\">advisory-\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443.<\/p>\n<h2>Transactions per second (TPS)<\/h2>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0431\u0430\u0437\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/monitoring-stats#PG-STAT-DATABASE-VIEW\">pg_stat_database<\/a>. \u041d\u043e \u0435\u0441\u043b\u0438 \u0431\u0430\u0437 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043d\u043e\u0433\u043e, \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u043d\u0438\u0445 \u0432\u0441\u0435\u0445, <b>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u043a <code>postgres<\/code><\/b>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TPS &amp; tuples<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">SELECT   extract(epoch from now())::integer ts , datname dbname , pg_stat_get_db_tuples_returned(oid) tup_returned , pg_stat_get_db_tuples_fetched(oid) tup_fetched , pg_stat_get_db_tuples_inserted(oid) tup_inserted , pg_stat_get_db_tuples_updated(oid) tup_updated , pg_stat_get_db_tuples_deleted(oid) tup_deleted , pg_stat_get_db_xact_commit(oid) xact_commit , pg_stat_get_db_xact_rollback(oid) xact_rollback FROM   pg_database WHERE   NOT datistemplate; <\/code><\/pre>\n<\/div><\/div>\n<p>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0447\u0443 \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u043d\u0435 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u043e\u0434\u043e\u043c <b>max-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/b> \u043c\u0435\u0442\u0440\u0438\u043a!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ls\/yn\/yt\/lsynyt4rkawj8hvp2pcrnvjiozk.png\"><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u0438\u0434\u0438\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u0438\u043a\u043e\u0432\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 (<b><code>commit<\/code><\/b>) \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439. \u042d\u0442\u043e \u043d\u0435 \u043e\u0434\u0438\u043d-\u0432-\u043e\u0434\u0438\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0440\u043e\u0441\u0442 \u0432 4 \u0440\u0430\u0437\u0430 \u044f\u0432\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0443 <b>\u0441\u0442\u043e\u0438\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0435\u0440\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/b>, \u0447\u0442\u043e\u0431\u044b \u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u0438\u043a \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u043e.<\/p>\n<p>  \u041d\u0443 \u0430 \u043e\u0442\u043a\u0430\u0442 (<b><code>rollback<\/code><\/b>) \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043f\u043e\u0432\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e \u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <code>ROLLBACK<\/code>, \u0438\u043b\u0438 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<h2>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438<\/h2>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432\/\u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dm\/av\/sw\/dmavswryoevflquj7krtbykqgtw.png\"><\/p>\n<ul>\n<li><b><code>tuples.returned<\/code><\/b> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u00ab\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u044b\u00bb \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li><b><code>tuples.fetched<\/code><\/b> \u2014 \u0442\u0435 \u0438\u0437 \u043d\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u044b \u00ab\u043f\u0440\u044f\u043c\u043e \u0442\u0443\u0442\u00bb \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 <code>Rows Removed by Filter<\/code>, \u0430 \u0443\u0448\u043b\u0438 \u00ab\u0432\u044b\u0448\u0435\u00bb \u043f\u043e \u043f\u043b\u0430\u043d\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/li>\n<li><b><code>tuples.ratio<\/code><\/b> \u2014 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 <b>\u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a 1<\/b>, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u2014 \u0442\u0435\u043c \u0445\u0443\u0436\u0435. \u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u0432\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b \u0432\u044b\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435, \u0447\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0430\u0448\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c.<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0435 <b>\u0440\u0435\u0437\u043a\u0438\u0439 \u043f\u0438\u043a <code>tuples.ratio<\/code><\/b> \u2014 \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0440\u044f\u0434\u043e\u043c \u0432 \u043b\u043e\u0433\u0435 \u0432\u0430\u043c \u043f\u043e\u043f\u0430\u0434\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/492694\/\">\u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e \u0440\u0435\u0446\u0435\u043f\u0442\u044b \u0438\u0445 \u043b\u0435\u0447\u0435\u043d\u0438\u044f<\/a>.<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 <code>ratio<\/code> \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0432\u043d\u043e 1, \u043d\u043e <b>\u043f\u0438\u043a \u043f\u0440\u0438\u0448\u0435\u043b\u0441\u044f \u043d\u0430 <code>returned\/fetched<\/code><\/b> \u2014 \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043d\u0435 \u0436\u0434\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0440\u043e\u0434\u0435:<\/p>\n<pre><code class=\"plaintext\">Hash Join   - Hash     - Seq Scan on BIG_TABLE   - Index Scan ...<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Merge Join   - Index Scan on BIG_INDEX   - Index Scan ...<\/code><\/pre>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u00ab\u0447\u0442\u043e\u00bb \u0443 \u043d\u0430\u0441 \u0442\u0430\u043c \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438 \u00ab\u043a\u0430\u043a\u00bb \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0443 \u043d\u0430\u0441 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c, \u0430 \u043a\u0430\u043a\u043e\u0439 \u2014 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 <b><code>Seq Scan<\/code><\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7y\/3o\/xq\/7y3oxqadodpa_zgrhyv0nfxzzua.png\"><\/p>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043b\u044e\u0431\u043e\u0439 \u0432\u043d\u0435\u043f\u043b\u0430\u043d\u043e\u0432\u044b\u0439 \u0440\u043e\u0441\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043d\u0443\u0436\u0434\u0430\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0447\u044c \u0432\u044b\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u043d\u0430 10M \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0438\u043a\u0430 \u0434\u043d\u0435\u043c \u2014 \u043f\u043e\u0432\u043e\u0434 \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u043a\u0430\u043c.<\/p>\n<p>  \u0420\u0430\u0432\u043d\u043e \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u043e-\u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0438\/\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/85\/pn\/dl\/85pndlf5hstls4os3jwmtsuserc.png\"><\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u044d\u0448\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0443\u0445\u0443\u0434\u0448\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u044f \u0432\u044b\u0447\u0438\u0442\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 <b>\u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 <code>block.read\/hit<\/code><\/b>. \u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u00ab\u0447\u0438\u0442\u0430\u0442\u044c\u00bb \u0441 \u0434\u0438\u0441\u043a\u0430 (<code>shared read<\/code> \u043d\u0430 \u0443\u0437\u043b\u0435 \u043f\u043b\u0430\u043d\u0430) \u0440\u043e\u0432\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e, \u0432\u0441\u0435 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 (<code>shared hit<\/code>), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <b>\u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0434\u0438\u0441\u043a\u0443 \u2014 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/b>.<\/p>\n<p>  \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a, \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u043e\u0434\u043e\u043c \u043a \u0434\u043e\u0441\u043a\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u043a\u043e\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0438\u043a\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bt\/ue\/xl\/btuexl-qt3d384qarrm0n6chlr0.png\"><\/p>\n<h2>\u0421\u0430\u043c\u044b\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\/\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f<\/h2>\n<p>  \u0414\u043b\u044f MVCC \u0434\u043e\u043b\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u2014 \u0431\u0435\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445 \u043f\u0440\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/post\/501040\/\">\u0442\u0443\u0442<\/a>, \u0430 <a href=\"https:\/\/habr.com\/ru\/post\/481866\/\">\u0442\u0443\u0442<\/a> \u2014 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0432\u044b\u0436\u0438\u0442\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a0\/jl\/ls\/a0jllsvlvmsny6hhyq_mjnhnmli.png\"><\/p>\n<p>  \u041f\u043e\u0439\u043c\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0437\u043b\u043e\u0434\u0435\u0435\u0432 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 <code>pg_stat_activity.query_start\/xact_start<\/code>.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0448 \u043e\u043f\u044b\u0442, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c, \u043a\u0443\u0434\u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u00ab\u043a\u043e\u043f\u0430\u0442\u044c\u00bb:<\/p>\n<ul>\n<li>\u0438\u0441\u043a\u0430\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/li>\n<li>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/li>\n<li>\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u00ab\u0436\u0435\u043b\u0435\u0437\u043e\u00bb<\/li>\n<li>\u2026 \u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u0435\u0441\u0435\u043d\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/li>\n<\/ul>\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\/company\/tensor\/blog\/502478\/\"> https:\/\/habr.com\/ru\/company\/tensor\/blog\/502478\/<\/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\/company\/tensor\/blog\/502478\/\">\u042f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b, <a href=\"https:\/\/habr.com\/ru\/post\/487380\/\">\u043a\u0430\u043a \u043c\u044b \u00ab\u043b\u043e\u0432\u0438\u043c\u00bb \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b PostgreSQL<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0441\u043e\u0442\u043d\u044f\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041d\u043e \u0432\u0435\u0434\u044c \u043a\u0440\u043e\u043c\u0435 \u043b\u043e\u0433\u043e\u0432, \u044d\u0442\u0430 \u0421\u0423\u0411\u0414 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0435\u0449\u0435 \u0438 <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/monitoring-stats#MONITORING-STATS-VIEWS\">\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/a> \u2014 \u0433\u0440\u0435\u0445 \u0438\u043c\u0438 \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043a\u043e\u0441\u0435\u0442\u044c \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u044c\u0437\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u044b.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s1\/za\/d-\/s1zad-d3claa2klkewtgrj8zdaa.png\"><\/div>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u0441\u0435 \u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439, \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/tensor\/blog\/328920\/\">\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0430\u0434 Zabbix<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043a\u0440\u0430\u043d\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u0442 <b>\u0435\u0434\u0438\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/b> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0431\u0430\u0437 \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0431\u0430\u0437 PostgreSQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0438 \u0433\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.  <\/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-303909","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303909","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=303909"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303909\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}