{"id":1087,"date":"2022-09-29T10:28:52","date_gmt":"2022-09-29T04:28:52","guid":{"rendered":"http:\/\/ast-1c.kz\/almasoft\/?p=1087"},"modified":"2022-09-29T10:28:52","modified_gmt":"2022-09-29T04:28:52","slug":"%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b8-postgresql-%d0%b4%d0%bb%d1%8f-1%d1%81","status":"publish","type":"post","link":"http:\/\/ast-1c.kz\/almasoft\/?p=1087","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 PostgreSQL \u0434\u043b\u044f 1\u0421"},"content":{"rendered":"\n<p><strong>\u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 postgre \u043a\u0430\u043a \u043d\u0430 Linux, \u0442\u0430\u043a \u0438 \u043d\u0430 Windows.<\/strong><\/p>\n\n\n\n<p><strong>\u0424\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 postgresql.conf \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435<\/strong><br>Linux:\/etc\/postgresql\/\u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438\/main<br>Windows: C:\\Program Files\\Postgres\\data\\<\/p>\n\n\n\n<p><strong>\u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c<\/strong> \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c. \u0422\u0430\u043a\u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 postgresql \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0442.\u043a. \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c sql.<br><br>\u0412 \u043b\u0438\u043d\u0443\u043a\u0441 &#8212; \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c: systemctl restart postgresql<br>\u0412 Windows &#8212; \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u043b\u0443\u0436\u0431\u044b, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c PostgreSQL \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0435.<\/p>\n\n\n\n<p><strong>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/strong><br>shared_buffers = RAM\/4<br>max_connections = 500..1000<br>work_mem = RAM\/32..64<br>temp_buffers = 256MB<br>fsync = on<br>wal_keep_segments = 256<br>wal_buffers = 16MB<br>min_wal_size = 512MB .. 4G<br>max_wal_size = 2 * min_wal_size<br>checkpoint_completion_target = 0.9<br>default_statistics_target = 1000<br>autovacuum = on<br>autovacuum_max_workers = \u0427\u0438\u0441\u043b\u043e \u044f\u0434\u0435\u0440\/4..2 \u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 4<br>autovacuum_naptime = 20s<br>bgwriter_delay = 20ms<br>bgwriter_lru_multiplier = 4.0<br>bgwriter_lru_maxpages = 400<br>synchronous_commit = off<br>ssl = off<br>effective_io_concurrency = 1&#8230;.1000<br>\u0412\u0430\u0436\u043d\u043e! \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0440\u0435\u0434\u0435 Linux, \u0432 Windows \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e.<br>1 &#8212; \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430, 2 \u0434\u043b\u044f RAID, 200 \u0434\u043b\u044f SSD, 500..1000 \u0434\u043b\u044f NVMe.<br>row_security = off<br>enable_nestloop = off<br>max_locks_per_transaction = 256<br>escape_string_warning = off<br>standard_conforming_strings = off<br>join_collapse_limit = 20<br>seq_page_cost = 0.1<br>random_page_cost = 2-4 &#8212; \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430, 1.5-2.0 \u0434\u043b\u044f RAID, 1.1-1.3 \u0434\u043b\u044f SSD,<br>cpu_operator_cost = 0.00025<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 postgre \u043a\u0430\u043a \u043d\u0430 Linux, \u0442\u0430\u043a \u0438 \u043d\u0430 Windows. \u0424\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 postgresql.conf \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435Linux:\/etc\/postgresql\/\u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438\/mainWindows: C:\\Program Files\\Postgres\\data\\ \u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c. \u0422\u0430\u043a\u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 postgresql \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0442.\u043a. \u043f\u043e\u0441\u043b\u0435 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"_links":{"self":[{"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/posts\/1087"}],"collection":[{"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1087"}],"version-history":[{"count":1,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/posts\/1087\/revisions"}],"predecessor-version":[{"id":1088,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=\/wp\/v2\/posts\/1087\/revisions\/1088"}],"wp:attachment":[{"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1087"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ast-1c.kz\/almasoft\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}