{"id":502186,"date":"2026-11-08T17:46:31","date_gmt":"2026-11-08T14:46:31","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=502186"},"modified":"2026-11-08T17:46:31","modified_gmt":"2026-11-08T14:46:31","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=502186","title":{"rendered":"\u0412\u0430\u0439\u0431\u043a\u043e\u0434\u0438\u043d\u0433 \u043f\u0440\u043e\u0442\u0438\u0432 \u0441\u043e\u0442\u043d\u0438 \u0448\u0430\u0440\u0434\u043e\u0432: \u043a\u0430\u043a \u044f \u0437\u0430 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u0441\u043e\u0431\u0440\u0430\u043b Terox"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/9f\/60\/b59f60014d6d030b9cb22e97284550ab.png\" alt=\"Terox: \u043e\u0434\u0438\u043d \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0448\u0430\u0440\u0434\u043e\u0432\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/b5\/9f\/60\/b59f60014d6d030b9cb22e97284550ab.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/9f\/60\/b59f60014d6d030b9cb22e97284550ab.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Terox: \u043e\u0434\u0438\u043d \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0448\u0430\u0440\u0434\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c PostgreSQL. \u0422\u043e\u0447\u043d\u0435\u0435, PostgreSQL \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437: \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0438 \u0441\u043e\u0442\u043d\u0438 \u0448\u0430\u0440\u0434\u043e\u0432.<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0431\u043e \u043c\u043d\u0435: \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0431\u044d\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b DBA. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u2014 \u043d\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0437\u0430 ORM, \u043d\u043e \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 <code>ALTER TABLE<\/code> \u043f\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0435 \u043c\u043d\u0435 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0428\u0442\u0430\u0442\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0441\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u0430\u043c\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0435\u043f\u043b\u043e\u0435\u043c. \u041d\u043e \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u043d: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u0442\u044f\u0436\u0451\u043b\u044b\u0439 DDL \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u044d\u0442\u0430\u043f\u0430\u043c\u0438. \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>statement_timeout<\/code>, \u043d\u0435 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0432\u0435\u0441\u044c \u043f\u0443\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0430\u0441\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u00ab\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b SQL, \u0432\u0440\u043e\u0434\u0435 \u0432\u0441\u0451 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u00bb. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0437\u0430\u0431\u044b\u0442\u044c <code>lock_timeout<\/code>, \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u0448\u0430\u0440\u0434 \u0438\u043b\u0438 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u043c\u043d\u0438\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0430 \u043d\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. Terox \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u2014 \u043d\u0435 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0448\u0430\u0440\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u044d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c?\u00bb \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0432\u0435\u0441\u0442:<\/p>\n<ol>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u043e\u0440\u0442 \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u0440\u044b\u0442\u044c <code>psql<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0442\u0430\u043c \u043d\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0440\u0434\u0443 \u0438 \u0443\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440.<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c pgAdmin, \u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0442\u043d\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0445\u043e\u0441\u0442, \u043f\u043e\u0440\u0442, \u0431\u0430\u0437\u0443, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b TLS, \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0448\u0430\u0440\u0434\u0430 \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0451 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c. \u041d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437\u0430\u0445 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0441\u043e\u0442\u043d\u0438, \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u043b\u0433\u0430\u044f, \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e shell-\u0430\u043b\u0438\u0430\u0441\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u044f\u0434\u043e\u043c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0440\u0435\u0432\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043d\u0435 \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a PostgreSQL. \u041c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u044b\u0448\u0435: <strong>\u0441\u0435\u0440\u0432\u0438\u0441 \u2192 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u2192 \u043e\u0434\u0438\u043d, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043b\u0438 \u0432\u0441\u0435 \u0448\u0430\u0440\u0434\u044b<\/strong>.<\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0441\u0435\u043b \u0440\u044f\u0434\u043e\u043c \u0441 \u0418\u0418 \u0438 \u043d\u0430\u0447\u0430\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u0430\u043c. \u041f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f <a href=\"https:\/\/github.com\/nvorobev\/terox\" rel=\"noopener nofollow\">Terox<\/a> \u2014 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 CLI-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 PostgreSQL-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c. \u0420\u0430\u0431\u043e\u0442\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 <code>SELECT<\/code>, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u043e\u0442\u043e\u043c.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e psql \u0438 pgAdmin<\/h3>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c: <code>psql<\/code> \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u0435\u043d. pgAdmin \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. Terox \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p>\u041d\u043e \u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0412 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041c\u043d\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0448\u0430\u0440\u0434\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0448\u0430\u0440\u0434, \u0433\u0434\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0440\u0434\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0434\u043e\u043b\u0433\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c\u0438 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c staging \u0438 production \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u0435\u043d. \u041f\u044f\u0442\u043d\u0438\u0446\u0430 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u043e\u043b\u044c consensus \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0433\u043e\u043b\u043e\u0441: \u00ab\u043c\u043e\u0436\u0435\u0442, \u0432 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a?\u00bb<\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0446\u0438\u043a\u043b \u0432\u043e\u043a\u0440\u0443\u0433 psql<\/h4>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">for shard in $(seq -w 1 128); do  psql \"host=pgbouncer-shop-rs${shard}.example.net ...\" \\    -c \"select * from items where item_id = 424242\"done<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0418 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c: \u043d\u0443\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c, \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0440\u0434\u043e\u0432, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e \u0446\u0438\u043a\u043b \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 production \u0441 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.<\/p>\n<p>Terox \u0432\u044b\u0440\u043e\u0441 \u043d\u0435 \u0438\u0437 \u0438\u0434\u0435\u0438 \u00ab\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043c psql\u00bb, \u0430 \u0438\u0437 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c <strong>\u043d\u0430\u0431\u043e\u0440\u0430 \u0448\u0430\u0440\u0434\u043e\u0432<\/strong>, \u0430 \u043d\u0435 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p>\u0412 Terox \u0445\u043e\u0441\u0442\u044b \u0438 \u0431\u0430\u0437\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0438\u0436\u0435 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u2014 \u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 128 \u0448\u0430\u0440\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">max_rows: 100fanout_concurrency: 8query_timeout: 7sstatement_timeout: 5slock_timeout: 500msservices:  shop:    storages:      prod:        host_template: pgbouncer-shop-rs{p1:03}.example.net        db_template: shard_{p}        port: 6432        user: readonly        password_env: TEROX_SHOP_PASSWORD        count: 128        sslmode: verify-full        prod: true        migration_role: app_writer<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><code>{p1:03}<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>001<\/code>, <code>002<\/code>, \u2026, <code>128<\/code>, \u0430 <code>{p}<\/code> \u2014 \u0432 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u0442 \u043d\u0443\u043b\u044f. \u0425\u043e\u0441\u0442 \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<p><code>fanout_concurrency<\/code> \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041e\u043d \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0431\u0440\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c 128 \u0448\u0430\u0440\u0434\u0430\u043c \u0438 \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0438\u043b. \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 <code>query_timeout<\/code> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0432\u044b\u0437\u043e\u0432 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0448\u0430\u0440\u0434\u0443, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 <code>statement_timeout<\/code> \u0438 <code>lock_timeout<\/code> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 PostgreSQL.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440:<\/p>\n<pre><code class=\"bash\">terox -t shop\/prod\/all<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0418\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u0448\u0430\u0440\u0434 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u044e. \u0412 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0438\u0434\u043d\u044b \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, production-\u0431\u0435\u0439\u0434\u0436, \u0440\u0435\u0436\u0438\u043c \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438 \u0438 <code>statement_timeout<\/code>.<\/p>\n<pre><code>shop\/prod(all) [prod ro st=5s] =&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0448\u0451\u043b \u043d\u0435 \u0442\u0443\u0434\u0430, \u0445\u043e\u0442\u044f \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u044f\u043c\u043e \u0432 prompt, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u043c\u043e\u0447\u044c.<\/p>\n<h3>Fan-out \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e fan-out<\/h3>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 <code>all<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f. Terox \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <code>shard<\/code>, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e \u0438\u043c\u0435\u043d\u0430\u043c \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0448\u0430\u0440\u0434\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u043b\u0438\u0441\u0442\u043e\u0447\u043a\u0435, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u043e\u0442\u043d\u0438 \u0448\u0430\u0440\u0434\u043e\u0432 \u043b\u0435\u0436\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u044c. \u0414\u043b\u044f \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0443\u0436\u043d\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u044c\u0446\u043e, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0443\u0434\u043d\u0438\u0447\u043d\u043e: \u00ab\u043d\u0430\u0439\u0434\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c ID \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00bb. \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0438\u043d\u0443\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u0445\u043e\u0431\u0431\u0438.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Terox \u0435\u0441\u0442\u044c <code>\\find<\/code>:<\/p>\n<pre><code>shop\/prod(all) =&gt; \\find items item_id = 424242\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u2502 shard    \u2502 count \u2502\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\u2502 shard_37 \u2502 1     \u2502\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518found on 1\/128 shard(s)\u2192 shop\/prod(shard_37)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>Terox \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u0442 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0433\u0434\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0448\u0430\u0440\u0434 \u043e\u0434\u0438\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0433\u043e. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u043e\u0441\u0442\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0438\u0433\u0440\u044b \u00ab\u0443\u0433\u0430\u0434\u0430\u0439 \u0448\u0430\u0440\u0434\u00bb.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/7d\/8b\/60\/7d8b6014ae4036d473839c6dab0cc945.png\" alt=\"\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u044c\u0446\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0440\u0434\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/7d\/8b\/60\/7d8b6014ae4036d473839c6dab0cc945.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/7d\/8b\/60\/7d8b6014ae4036d473839c6dab0cc945.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u044c\u0446\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0440\u0434<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0448\u0430\u0440\u0434 \u0432\u0440\u0443\u0447\u043d\u0443\u044e:<\/p>\n<pre><code>\\s shard_37<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0447\u0430\u0441\u0442\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\\count<\/code>, <code>\\locate<\/code>, <code>\\grep<\/code>, \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 CSV\/JSON. \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0440\u0435\u043b\u043a\u043e\u0439 \u0432\u0432\u0435\u0440\u0445 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0432\u0432\u043e\u0434, \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0436\u0438\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0445\u0435\u043c\u0430\u043c, \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c. \u0415\u0441\u0442\u044c \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438: \u0435\u0441\u043b\u0438 \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0430\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435, Terox \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0430\u043b\u044c\u0446\u044b \u043f\u043e\u043c\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0433\u043e\u043b\u043e\u0432\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/44\/19\/af\/4419aff919d69a5a6d3e19e5627174b2.png\" alt=\"\u041c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 SQL \u0438 \u0436\u0438\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 Terox\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/44\/19\/af\/4419aff919d69a5a6d3e19e5627174b2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/44\/19\/af\/4419aff919d69a5a6d3e19e5627174b2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 SQL \u0438 \u0436\u0438\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 Terox<\/figcaption><\/div>\n<\/figure>\n<h4>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 fan-out<\/h4>\n<p>\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>\u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440 all \/ 0,1,5        \u2502        \u25bc\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0448\u0430\u0440\u0434\u043e\u0432        \u2502        \u25bc\u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441 \u043b\u0438\u043c\u0438\u0442\u043e\u043c fanout_concurrency        \u2502        \u251c\u2500\u2500 shard_0: READ ONLY + SET LOCAL statement_timeout        \u251c\u2500\u2500 shard_1: READ ONLY + SET LOCAL statement_timeout        \u2514\u2500\u2500 shard_N: READ ONLY + SET LOCAL statement_timeout        \u2502        \u25bc\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a + \u043a\u043e\u043b\u043e\u043d\u043a\u0430 shard + \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u043f\u0443\u043b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u043e: \u043f\u043e\u043a\u0430 \u043a \u0431\u0430\u0437\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c, \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u0443\u043b\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u2014 \u0432\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0440\u0434\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e <code>fanout_concurrency<\/code>.<\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u0441\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0434\u0435\u0434\u043b\u0430\u0439\u043d. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0448\u0430\u0440\u0434 \u043d\u0435 \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. <code>Ctrl+C<\/code> \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0435\u0449\u0451 \u043d\u0435 \u043d\u0430\u0447\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442. \u041f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u043b\u044b \u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f.<\/p>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0440\u0434\u0435 \u0438\u0434\u0451\u0442 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 PostgreSQL-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 <code>READ ONLY<\/code>, \u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0430 SQL. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f <code>max_rows<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 <code>SELECT<\/code> \u043d\u0435 \u0441\u044a\u0435\u043b \u043f\u0430\u043c\u044f\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430; \u043f\u043e\u043b\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435.<\/p>\n<h3>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0448\u044c \u043f\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c<\/h3>\n<p>\u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u043e\u0431\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. <code>\\activity<\/code>, <code>\\blockers<\/code>, <code>\\locks<\/code> \u0438 <code>\\longtx<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438; <code>\\sizes<\/code> \u0438 <code>\\statements --skew<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043e\u0441 \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0440\u0434\u0430\u043c\u0438; <code>\\diff &lt;table&gt;<\/code> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0445\u0435\u043c\u0443, \u0430 <code>\\doctor --all<\/code> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 health-check. \u0414\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0435\u0441\u0442\u044c <code>\\explain<\/code>, <code>\\advise<\/code> \u0438 <code>\\lint<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0443 \u0438 \u043d\u0435 \u043a\u0430\u0440\u043c\u0430\u043d\u043d\u044b\u0439 DBA. \u0421\u043a\u043e\u0440\u0435\u0435, \u044d\u0442\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0443\u0442\u044c \u043e\u0442 \u00ab\u0447\u0442\u043e-\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u00bb \u0434\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0434\u0442\u0438 \u0432 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438 \u0438 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>\\lint<\/code> \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u043f\u0440\u043e <code>DELETE<\/code> \u0431\u0435\u0437 <code>WHERE<\/code>, <code>LIMIT<\/code> \u0431\u0435\u0437 <code>ORDER BY<\/code>, \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043a\u0430\u0440\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438\u043b\u0438 <code>NOT IN<\/code> \u0441 nullable-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u042d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f. \u0417\u0430\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0443\u0441\u0442\u0430\u0451\u0442 \u0438 \u043d\u0435 \u0434\u0443\u043c\u0430\u0435\u0442: \u00ab\u0434\u0430 \u043b\u0430\u0434\u043d\u043e, \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439\u00bb.<\/p>\n<h3>\u0417\u0430\u043f\u0438\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e<\/h3>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0432 Terox \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 <code>READ ONLY<\/code>-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <code>ro<\/code>, \u0430 \u043f\u0438\u0448\u0443\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<pre><code>\\write on<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u043b\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 write-\u0440\u0435\u0436\u0438\u043c \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u00ab\u044f \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0437\u0430\u0434\u0430\u043d\u0430 <code>migration_role<\/code>, \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0451 \u0447\u0435\u0440\u0435\u0437 <code>SET LOCAL ROLE<\/code>. \u041e\u0431\u044b\u0447\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">begin;set local role app_writer;set local statement_timeout = '5s';set local lock_timeout = '500ms';-- \u0442\u0435\u043b\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438commit;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e <code>LOCAL<\/code>: \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0436\u0438\u0432\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u043a\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 PgBouncer.<\/p>\n<p><code>DROP DATABASE<\/code> \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e. \u0414\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0437\u0440\u043e\u0441\u043b\u044b\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u041d\u043e \u043a\u043b\u0438\u0435\u043d\u0442, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u043e\u0442\u043d\u0435 \u0448\u0430\u0440\u0434\u043e\u0432, \u0442\u043e\u0436\u0435 \u0432\u0437\u0440\u043e\u0441\u043b\u044b\u0439 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c SQL \u0441\u0442\u043e \u0440\u0430\u0437\u00bb<\/h3>\n<p>\u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443: \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0435\u0434\u0443\u0442 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0420\u0435\u0436\u0438\u043c \u043d\u0438\u0436\u0435 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u043e\u0439 \u043d\u0430 \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u0442\u0430\u043f.<\/p>\n<p>\u0414\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c:<\/p>\n<pre><code>\\migrate add_column.sql<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0411\u0435\u0437 <code>--allowed<\/code> \u044d\u0442\u043e dry-run: Terox \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u044b\u0439 SQL, \u043f\u043b\u0430\u043d \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e:<\/p>\n<pre><code>\\migrate --allowed add_column.sql<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0435\u0441\u0442\u044c canary, \u0431\u0430\u0442\u0447\u0438 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0438:<\/p>\n<pre><code>\\migrate --allowed --canary add_column.sql\\migrate --allowed --batch 10 add_column.sql\\migrate --allowed --resume add_column.sql<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u0442\u0443\u044e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c.<\/p>\n<p>\u041e\u0431\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043d\u0430 128 PostgreSQL-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0437\u0434\u0435\u0441\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0435\u0442. \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430: \u043e\u0434\u0438\u043d \u0443\u0436\u0435 \u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>COMMIT<\/code>, \u043a\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0435\u0440\u043d\u0443\u043b \u043e\u0448\u0438\u0431\u043a\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0449\u0451 \u043d\u0435 \u043d\u0430\u0447\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0446\u0435\u043b\u0438, \u043e\u0442\u0447\u0451\u0442 \u044f\u0432\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u0430 <code>--resume<\/code> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0440\u0434\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u043c\u0438, \u0430 canary \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0431\u0430\u0442\u0447\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u0433\u0435\u0440\u043e\u0438\u0437\u043c\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432: <code>CREATE INDEX CONCURRENTLY<\/code>, <code>REINDEX CONCURRENTLY<\/code>, <code>VACUUM<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u043d\u0438\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u0441 <code>SET LOCAL<\/code> \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c\u0438. Terox \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442 \u0442\u0430\u043a\u043e\u0439 SQL, \u0433\u0440\u043e\u043c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c, \u0430 \u043d\u0430 production \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 <code>migration_timeout<\/code> \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ed\/8c\/46\/ed8c46e07fea28b97a40bc08a7dcf66e.png\" alt=\"\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438: \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b, canary, \u0431\u0430\u0442\u0447\u0438 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ed\/8c\/46\/ed8c46e07fea28b97a40bc08a7dcf66e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ed\/8c\/46\/ed8c46e07fea28b97a40bc08a7dcf66e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438: \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b, canary, \u0431\u0430\u0442\u0447\u0438 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0431\u044b\u043b \u043d\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, \u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c. \u041a\u0440\u043e\u043c\u0435 <code>DROP DATABASE<\/code>. \u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0438 \u0442\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3>\u0413\u0434\u0435 \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0439\u0431\u043a\u043e\u0434\u0438\u043d\u0433<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c Terox \u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u043b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0418\u0418. \u041d\u0435 \u0432 \u0441\u043c\u044b\u0441\u043b\u0435 \u00ab\u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u043c\u043f\u0442 \u0438 \u0443\u0448\u0451\u043b \u043f\u0438\u0442\u044c \u043a\u043e\u0444\u0435\u00bb. \u041a\u043e\u0444\u0435 \u044f \u043f\u0438\u043b \u0440\u044f\u0434\u043e\u043c.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0431\u043e\u043b\u044c \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0418 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043a\u043e\u0434, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0442\u0435\u0441\u0442\u044b \u0438 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0440\u0443\u043a\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0441\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0435\u0442\u0430\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0434\u043a\u043e \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e:<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0443\u043b\u043e\u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p><code>Ctrl+C<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 prompt, \u043d\u043e \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e SQL \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u0440\u043e\u0433\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 YAML-\u043f\u043e\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0443\u0442\u0435\u0447\u043a\u0438 session-scoped \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438 transaction pooling;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u0443\u043b\u043e\u0432 \u0438 race-\u043f\u0440\u043e\u0433\u043e\u043d\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0418 \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u043a\u043b. \u041e\u043d \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430, \u043f\u0438\u0448\u0435\u0442 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043d\u0435 \u0436\u0430\u043b\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u044c\u0431\u0443 \u00ab\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0447\u0442\u0438 \u0435\u0449\u0451 \u0432\u043e\u0442 \u044d\u0442\u043e\u00bb.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430: \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u0443\u044e \u0438\u0434\u0435\u044e \u043e\u043d \u0442\u043e\u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e, \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0434\u0432\u0435\u043d\u0430\u0434\u0446\u0430\u0442\u0438 \u0444\u0430\u0439\u043b\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u2014 \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c: <strong>\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u0434<\/strong>.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>read-only \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f PostgreSQL, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0431\u044f\u0437\u0430\u043d\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 SQL \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0448\u0430\u0440\u0434\u0430\u0445 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u044b\u0439 \u0443\u0441\u043f\u0435\u0445;<\/p>\n<\/li>\n<li>\n<p>dry-run \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0441\u0442\u0430\u0442\u044c apply \u0438\u0437-\u0437\u0430 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u0441 \u0418\u0418 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. \u0411\u0435\u0437 \u043d\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432.<\/p>\n<h3>\u0427\u0442\u043e Terox \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430 \u0432\u0430\u0441<\/h3>\n<p>Terox \u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 SQL \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u2014 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430. \u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0430 \u0440\u043e\u043b\u0438, <code>READ ONLY<\/code>-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, TLS, \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0438 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u0430 \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0438.<\/p>\n<p>\u041e\u043d \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433, \u0431\u044d\u043a\u0430\u043f\u044b \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0435 \u0437\u043d\u0430\u0435\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u043c\u044b\u0441\u043b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0418, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0441\u0435\u0445 128 \u0448\u0430\u0440\u0434\u0430\u0445. \u041e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0443\u043c\u0435\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 \u0432\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438.<\/p>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/h3>\n<p>\u0418\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u0432\u044b\u0440\u043e\u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c:<\/p>\n<ul>\n<li>\n<p>\u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0448\u0430\u0440\u0434\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0446\u0435\u043b\u0435\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0437\u043d\u0430\u0435\u0442 \u043e \u043c\u043d\u043e\u0433\u043e\u0448\u0430\u0440\u0434\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u0435\u043d\u0438\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043e <code>READ ONLY<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 dry-run, lint, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0438 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u0443\u044e \u0440\u0430\u0441\u043a\u0430\u0442\u043a\u0443;<\/p>\n<\/li>\n<li>\n<p>CLI \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u043c \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0418\u0418. \u041d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c Terox \u0441\u0442\u0430\u043b \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u043e\u0434 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0431\u044b\u0441\u0442\u0440\u043e. \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043e\u043d \u0441\u0442\u0430\u043b, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438, \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0438 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0439\u0431\u043a\u043e\u0434\u0438\u043d\u0433: \u043d\u0435 \u00ab\u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00bb, \u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439: <a href=\"https:\/\/github.com\/nvorobev\/terox\" rel=\"noopener nofollow\"><strong>github.com\/nvorobev\/terox<\/strong><\/a><\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442\u043a\u0440\u044b\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0438\u0434\u0435\u0438 \u0438 pull request\u2019\u044b \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0448\u0430\u0440\u0434, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0431\u044b\u0442\u044c.<\/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\/articles\/1105130\/\">https:\/\/habr.com\/ru\/articles\/1105130\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Terox: \u043e\u0434\u0438\u043d \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0448\u0430\u0440\u0434\u043e\u0432\u041d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c PostgreSQL. \u0422\u043e\u0447\u043d\u0435\u0435, PostgreSQL \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437: \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0438 \u0441\u043e\u0442\u043d\u0438 \u0448\u0430\u0440\u0434\u043e\u0432.\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0431\u043e \u043c\u043d\u0435: \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0431\u044d\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b DBA. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u2014 \u043d\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0437\u0430 ORM, \u043d\u043e \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 ALTER TABLE \u043f\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0435 \u043c\u043d\u0435 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f.\u0428\u0442\u0430\u0442\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0441\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u0430\u043c\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0435\u043f\u043b\u043e\u0435\u043c. \u041d\u043e \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u043d: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u0442\u044f\u0436\u0451\u043b\u044b\u0439 DDL \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u044d\u0442\u0430\u043f\u0430\u043c\u0438. \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c statement_timeout, \u043d\u0435 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0430\u0434\u043e\u043b\u0433\u043e \u0432\u0435\u0441\u044c \u043f\u0443\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.\u0422\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0430\u0441\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u00ab\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b SQL, \u0432\u0440\u043e\u0434\u0435 \u0432\u0441\u0451 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u00bb. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0437\u0430\u0431\u044b\u0442\u044c lock_timeout, \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u0448\u0430\u0440\u0434 \u0438\u043b\u0438 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u043c\u043d\u0438\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0430 \u043d\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. Terox \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0440\u0443\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u2014 \u043d\u0435 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0448\u0430\u0440\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u044d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c?\u00bb \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0432\u0435\u0441\u0442:\u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442;\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u043e\u0440\u0442 \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b;\u043e\u0442\u043a\u0440\u044b\u0442\u044c psql;\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441;\u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u0442\u0430\u043c \u043d\u0435\u0442;\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0440\u0434\u0443 \u0438 \u0443\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440.\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c pgAdmin, \u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0442\u043d\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0445\u043e\u0441\u0442, \u043f\u043e\u0440\u0442, \u0431\u0430\u0437\u0443, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b TLS, \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0448\u0430\u0440\u0434\u0430 \u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0451 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c. \u041d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437\u0430\u0445 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0441\u043e\u0442\u043d\u0438, \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u043b\u0433\u0430\u044f, \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e shell-\u0430\u043b\u0438\u0430\u0441\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u044f\u0434\u043e\u043c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0440\u0435\u0432\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.\u0412\u0441\u0435 \u044d\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043d\u0435 \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a PostgreSQL. \u041c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u044b\u0448\u0435: \u0441\u0435\u0440\u0432\u0438\u0441 \u2192 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u2192 \u043e\u0434\u0438\u043d, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043b\u0438 \u0432\u0441\u0435 \u0448\u0430\u0440\u0434\u044b.\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0441\u0435\u043b \u0440\u044f\u0434\u043e\u043c \u0441 \u0418\u0418 \u0438 \u043d\u0430\u0447\u0430\u043b \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u0430\u043c. \u041f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f Terox \u2014 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 CLI-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 PostgreSQL-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438.\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c. \u0420\u0430\u0431\u043e\u0442\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 SELECT, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u043e\u0442\u043e\u043c.\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e psql \u0438 pgAdmin\u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c: psql \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u0435\u043d. pgAdmin \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. Terox \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445.\u041d\u043e \u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0412 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.\u041c\u043d\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438:\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0448\u0430\u0440\u0434\u0430\u0445;\u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0430;\u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0448\u0430\u0440\u0434, \u0433\u0434\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435;\u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0440\u0434\u0430\u043c\u0438;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0434\u043e\u043b\u0433\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443;\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c\u0438 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430;\u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c staging \u0438 production \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c.\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u0435\u043d. \u041f\u044f\u0442\u043d\u0438\u0446\u0430 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u043e\u043b\u044c consensus \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0433\u043e\u043b\u043e\u0441: \u00ab\u043c\u043e\u0436\u0435\u0442, \u0432 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a?\u00bb\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0446\u0438\u043a\u043b \u0432\u043e\u043a\u0440\u0443\u0433 psql\u0421\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:for shard in $(seq -w 1 128); do  psql &#171;host=pgbouncer-shop-rs${shard}.example.net &#8230;&#187; \\    -c &#171;select * from items where item_id = 424242&#8243;done\u0418 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c: \u043d\u0443\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c, \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0440\u0434\u043e\u0432, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e \u0446\u0438\u043a\u043b \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 production \u0441 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.Terox \u0432\u044b\u0440\u043e\u0441 \u043d\u0435 \u0438\u0437 \u0438\u0434\u0435\u0438 \u00ab\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043c psql\u00bb, \u0430 \u0438\u0437 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0430 \u0448\u0430\u0440\u0434\u043e\u0432, \u0430 \u043d\u0435 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.\u041e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439\u0412 Terox \u0445\u043e\u0441\u0442\u044b \u0438 \u0431\u0430\u0437\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0438\u0436\u0435 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u2014 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u2014 \u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 128 \u0448\u0430\u0440\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:max_rows: 100fanout_concurrency: 8query_timeout: 7sstatement_timeout: 5slock_timeout: 500msservices:  shop:    storages:      prod:        host_template: pgbouncer-shop-rs{p1:03}.example.net        db_template: shard_{p}        port: 6432        user: readonly        password_env: TEROX_SHOP_PASSWORD        count: 128        sslmode: verify-full        prod: true        migration_role: app_writer{p1:03} \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 001, 002, \u2026, 128, \u0430 {p} \u2014 \u0432 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u0442 \u043d\u0443\u043b\u044f. \u0425\u043e\u0441\u0442 \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.fanout_concurrency \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u041e\u043d \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0431\u0440\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c 128 \u0448\u0430\u0440\u0434\u0430\u043c \u0438 \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0438\u043b. \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 query_timeout \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0432\u044b\u0437\u043e\u0432 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0448\u0430\u0440\u0434\u0443, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 statement_timeout \u0438 lock_timeout \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 PostgreSQL.\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440:terox -t shop\/prod\/all\u0418\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u0448\u0430\u0440\u0434 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u044e. \u0412 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0438\u0434\u043d\u044b \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, production-\u0431\u0435\u0439\u0434\u0436, \u0440\u0435\u0436\u0438\u043c \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438 \u0438 statement_timeout.shop\/prod(all) [prod ro st=5s] =&gt;\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0448\u0451\u043b \u043d\u0435 \u0442\u0443\u0434\u0430, \u0445\u043e\u0442\u044f \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u044f\u043c\u043e \u0432 prompt, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u043c\u043e\u0447\u044c.Fan-out \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e fan-out\u0417\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 all \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f. Terox \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 shard, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043f\u043e \u0438\u043c\u0435\u043d\u0430\u043c \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439.\u0423 \u043d\u0430\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0448\u0430\u0440\u0434\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u043b\u0438\u0441\u0442\u043e\u0447\u043a\u0435, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u043e\u0442\u043d\u0438 \u0448\u0430\u0440\u0434\u043e\u0432 \u043b\u0435\u0436\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u044c. \u0414\u043b\u044f \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0443\u0436\u043d\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u044c\u0446\u043e, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.\u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0443\u0434\u043d\u0438\u0447\u043d\u043e: \u00ab\u043d\u0430\u0439\u0434\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c ID \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00bb. \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0438\u043d\u0443\u0442\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u0445\u043e\u0431\u0431\u0438.\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 Terox \u0435\u0441\u0442\u044c \\find:shop\/prod(all) =&gt; \\find items item_id = 424242\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u2502 shard    \u2502 count \u2502\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\u2502 shard_37 \u2502 1     \u2502\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518found on 1\/128 shard(s)\u2192 shop\/prod(shard_37)Terox \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u0442 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0440\u0434\u0430\u043c, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0433\u0434\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0438, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0448\u0430\u0440\u0434 \u043e\u0434\u0438\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0433\u043e. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u043e\u0441\u0442\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0438\u0433\u0440\u044b \u00ab\u0443\u0433\u0430\u0434\u0430\u0439 \u0448\u0430\u0440\u0434\u00bb.\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u044c\u0446\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0440\u0434\u0410 \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0448\u0430\u0440\u0434 \u0432\u0440\u0443\u0447\u043d\u0443\u044e:\\s shard_37\u0414\u043b\u044f \u0447\u0430\u0441\u0442\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \\count, \\locate, \\grep, \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 CSV\/JSON. \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0440\u0435\u043b\u043a\u043e\u0439 \u0432\u0432\u0435\u0440\u0445 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c.\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0432\u0432\u043e\u0434, \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0436\u0438\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0445\u0435\u043c\u0430\u043c, \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c. \u0415\u0441\u0442\u044c \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438: \u0435\u0441\u043b\u0438 \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0430\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435, Terox \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0430\u043b\u044c\u0446\u044b \u043f\u043e\u043c\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0433\u043e\u043b\u043e\u0432\u044b.\u041c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 SQL \u0438 \u0436\u0438\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0432 Terox\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 fan-out\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:\u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440 all \/ 0,1,5        \u2502        \u25bc\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0448\u0430\u0440\u0434\u043e\u0432        \u2502        \u25bc\u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441 \u043b\u0438\u043c\u0438\u0442\u043e\u043c fanout_concurrency        \u2502        \u251c\u2500\u2500 shard_0: READ ONLY + SET LOCAL statement_timeout        \u251c\u2500\u2500 shard_1: READ ONLY + SET LOCAL statement_timeout        \u2514\u2500\u2500 shard_N: READ ONLY + SET LOCAL statement_timeout        \u2502        \u25bc\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a + \u043a\u043e\u043b\u043e\u043d\u043a\u0430 shard + \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u043f\u0443\u043b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u043e: \u043f\u043e\u043a\u0430 \u043a \u0431\u0430\u0437\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c, \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0442. \u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u0443\u043b\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u2014 \u0432\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u043e \u0448\u0430\u0440\u0434\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e fanout_concurrency.\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430 \u0441\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0434\u0435\u0434\u043b\u0430\u0439\u043d. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0448\u0430\u0440\u0434 \u043d\u0435 \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445: \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. Ctrl+C \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u0435\u0449\u0451 \u043d\u0435 \u043d\u0430\u0447\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442. \u041f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u043b\u044b \u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f.\u0427\u0442\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0440\u0434\u0435 \u0438\u0434\u0451\u0442 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 PostgreSQL-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 READ ONLY, \u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0430 SQL. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f max_rows, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 SELECT \u043d\u0435 \u0441\u044a\u0435\u043b \u043f\u0430\u043c\u044f\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430; \u043f\u043e\u043b\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435.\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0448\u044c \u043f\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c\u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u043e\u0431\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \\activity, \\blockers, \\locks \u0438 \\longtx \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438; \\sizes \u0438 \\statements &#8212;skew \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043e\u0441 \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0440\u0434\u0430\u043c\u0438; \\diff &lt;table&gt; \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0445\u0435\u043c\u0443, \u0430 \\doctor &#8212;all \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 health-check. \u0414\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0435\u0441\u0442\u044c \\explain, \\advise \u0438 \\lint.\u042d\u0442\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0443 \u0438 \u043d\u0435 \u043a\u0430\u0440\u043c\u0430\u043d\u043d\u044b\u0439 DBA. \u0421\u043a\u043e\u0440\u0435\u0435, \u044d\u0442\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0443\u0442\u044c \u043e\u0442 \u00ab\u0447\u0442\u043e-\u0442\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u00bb \u0434\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0434\u0442\u0438 \u0432 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438 \u0438 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \\lint \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u043f\u0440\u043e DELETE \u0431\u0435\u0437 WHERE, LIMIT \u0431\u0435\u0437 ORDER BY, \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043a\u0430\u0440\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438\u043b\u0438 NOT IN \u0441 nullable-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u042d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f. \u0417\u0430\u0442\u043e \u043e\u043d\u0430 \u043d\u0435&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-502186","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/502186","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=502186"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/502186\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=502186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=502186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=502186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}