{"id":446533,"date":"2025-01-30T21:04:50","date_gmt":"2025-01-30T21:04:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=446533"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-01-30T21:04:50","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=446533","title":{"rendered":"<span>PostgreSQL 18: \u0427\u0430\u0441\u0442\u044c 2 \u0438\u043b\u0438 \u041a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442 2024-09<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/j6\/i4\/-6\/j6i4-6-12c-hkh31c75fs5gkgsq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/j6\/i4\/-6\/j6i4-6-12c-hkh31c75fs5gkgsq.png\"\/><\/p>\n<p> <\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/peter.eisentraut.org\/blog\/2023\/10\/10\/commitfest-throughput\">\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435<\/a>, \u0432 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430\u0445 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432. \u041d\u043e \u043f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u041c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u043f\u0430\u0442\u0447\u0435\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p> <\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438\u0437 \u0438\u044e\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/856498\/\">2024-07<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a> <\/p>\n<p><a href=\"#commit_9758174e2\">\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><br \/> <a href=\"#commit_e22253467\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0437 10000000000<\/a><br \/> <a href=\"#commit_1eff8279d\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0441\u0442\u0440\u043e\u043a<\/a><br \/> <a href=\"#commit_3f44959f4\">\u0427\u0442\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438<\/a><br \/> <a href=\"#commit_40e2e5e92\">pg_upgrade: \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><br \/> <a href=\"#commit_adf97c156\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/a><br \/> <a href=\"#commit_ca6fde922\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 JSON<\/a><br \/> <a href=\"#commit_ca481d3c9\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric<\/a><br \/> <a href=\"#commit_9428c001f\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric<\/a><br \/> <a href=\"#commit_62ddf7ee9\">ANALYZE ONLY \u0438 VACUUM ONLY<\/a><br \/> <a href=\"#commit_17cc5f666\">\u0423\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438<\/a><br \/> <a href=\"#commit_ba90eac7a\">pg_stat_statements: \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 SET<\/a><br \/> <a href=\"#commit_c297a47c5\">postgres_fdw_get_connections \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/a><br \/> <a href=\"#commit_e7834a1a2\">file_fdw: \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432<\/a><br \/> <a href=\"#commit_4eada203a\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f has_largeobject_privilege<\/a><br \/> <a href=\"#commit_760162fed\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 crc32 \u0438 crc32c<\/a><br \/> <a href=\"#commit_28a1121fd\">\u041a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e search_path<\/a><br \/> <a href=\"#commit_d55322b0d\">psql: \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/a><br \/> <a href=\"#commit_8dfd31290\">pg_verifybackup: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043f\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 tar<\/a><\/p>\n<p> <\/p>\n<hr\/>\n<p> <a name=\"commit_9758174e2\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5064\/\">\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=9758174e2\">9758174e2<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=edcb71258\">edcb71258<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=640178c92\">640178c92<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=6c2b5edec\">6c2b5edec<\/a><\/p>\n<p> <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435-\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0431 \u044d\u0442\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043d\u0435 \u0443\u0437\u043d\u0430\u0435\u0442. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435. \u0418\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\/\u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0430 \u0435\u0435 \u0443\u0436\u0435 \u043d\u0435\u0442 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435. \u0412\u0441\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c 6 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0433\u043b\u0430\u0432\u044b \u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438: <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/logical-replication-conflicts.html\">\u041a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b<\/a>. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p> <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0435\u0449\u0435 \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 update_missing.<\/p>\n<p> <\/p>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0435-\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE test(id int PRIMARY KEY);<\/code><\/pre>\n<p> <\/p>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">pub=# INSERT INTO test (id) VALUES (1);<\/code><\/pre>\n<p> <\/p>\n<p>\u0410 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435 \u0435\u0435 \u0441\u0440\u0430\u0437\u0443 \u0443\u0434\u0430\u043b\u0438\u043c:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">sub=# DELETE FROM test WHERE id = 1;<\/code><\/pre>\n<p> <\/p>\n<p>\u0412\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">pub=# UPDATE test SET id = 2 WHERE id = 1 RETURNING *;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\"> id ----   2 (1 row)<\/code><\/pre>\n<p> <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043d\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435, \u0432\u0435\u0434\u044c \u0442\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 id=1 \u043d\u0435\u0442. \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043c\u044b \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u0443\u0437\u043d\u0430\u0435\u043c, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0441\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f.<\/p>\n<p> <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/monitoring-stats.html#MONITORING-PG-STAT-SUBSCRIPTION-STATS\">pg_stat_subscription_stats<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041e\u0431\u0440\u0430\u0442\u0438\u0432\u0448\u0438\u0441\u044c \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a confl_update_missing \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">sub=# SELECT * FROM pg_stat_subscription_stats WHERE subname = 'sub'<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">-[ RECORD 1 ]---------------+------ subid                       | 16390 subname                     | sub apply_error_count           | 0 sync_error_count            | 0 confl_insert_exists         | 0 confl_update_origin_differs | 0 confl_update_exists         | 0 confl_update_missing        | 1 confl_delete_origin_differs | 0 confl_delete_missing        | 0 stats_reset                 |<\/code><\/pre>\n<p> <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435:<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">2025-01-23 23:33:35.763 MSK [170775] LOG:  conflict detected on relation \"public.test\": conflict=update_missing 2025-01-23 23:33:35.763 MSK [170775] DETAIL:  Could not find the row to be updated.     Remote tuple (2); replica identity (id)=(1). 2025-01-23 23:33:35.763 MSK [170775] CONTEXT:  processing remote data for replication origin \"pg_16390\" during message type \"UPDATE\" for replication target relation \"public.test\" in transaction 746, finished at 0\/183DC60<\/code><\/pre>\n<p> <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0445\u043e\u0434 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043d\u0430\u0434\u0435\u0436\u0434 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u0435\u0434\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/OS0PR01MB5716352552DFADB8E9AD1D8994C92@OS0PR01MB5716.jpnprd01.prod.outlook.com\">\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f<\/a> \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438: <code>apply(remote_apply)<\/code> \u0438 <code>skip(keep_local)<\/code>. \u041d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0446\u0435\u043d\u043d\u0430 \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0435\u0451. \u0416\u0434\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f!<\/p><\/blockquote>\n<p> <a name=\"commit_e22253467\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5032\/\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0437 10000000000<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=e22253467\">e22253467<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=c01743aa4\">c01743aa4<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=161320b4b\">161320b4b<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=84b8fccbe\">84b8fccbe<\/a><\/p>\n<p> <\/p>\n<p>\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 enable_* \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043c \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE t (id int);  SET enable_seqscan = off; EXPLAIN (settings) SELECT * FROM t;<\/code><\/pre>\n<p> <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u0435\u0434\u044c \u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u044e\u0431\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d.<\/p>\n<p> <\/p>\n<p>\u0412 \u043f\u043b\u0430\u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">                               QUERY PLAN                                ------------------------------------------------------------------------  Seq Scan on t  (cost=10000000000.00..10000000035.50 rows=2550 width=4)  Settings: enable_seqscan = 'off' (2 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u041a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 Seq Scan \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 10_000_000_000. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043a \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u0431\u044b \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c\u0438, \u043f\u0440\u0438 \u0438\u0445 \u043d\u0430\u043b\u0438\u0447\u0438\u0438. \u041d\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n<p> <\/p>\n<p>\u0412 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0443\u0434\u0430\u043b\u0438\u043b\u0438, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 enable_*. \u0410 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">                     QUERY PLAN                       -----------------------------------------------------  Seq Scan on t  (cost=0.00..35.50 rows=2550 width=4)    Disabled: true  Settings: enable_seqscan = 'off' (3 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u041f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e, \u0431\u0435\u0437 \u00ab\u043d\u0430\u043a\u0440\u0443\u0442\u043e\u043a\u00bb. \u0421\u0442\u0440\u043e\u043a\u0430 <code>Disabled: true<\/code> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0435\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<\/p>\n<p> <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0435\u0441\u0442\u044c, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d:<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">CREATE INDEX ON t(id); ANALYZE t;  EXPLAIN (settings) SELECT * FROM t;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                              QUERY PLAN                                -----------------------------------------------------------------------  Index Only Scan using t_id_idx on t  (cost=0.12..8.14 rows=1 width=4)  Settings: enable_seqscan = 'off' (2 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 EXPLAIN \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 settings (\u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 12-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u0442. \u043a. \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043d\u0430 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p> <a name=\"commit_1eff8279d\"><\/a> <\/p>\n<p><strong>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0441\u0442\u0440\u043e\u043a<\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=1eff8279d\">1eff8279d<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=53abb1e0e\">53abb1e0e<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=590b045c3\">590b045c3<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=97651b013\">97651b013<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=04bcf9e19\">04bcf9e19<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=908a96861\">908a96861<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=9fba1ed29\">9fba1ed29<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=95d6e9af0\">95d6e9af0<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=5d56d07ca\">5d56d07ca<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=40708acd6\">40708acd6<\/a><\/p>\n<p> <\/p>\n<p>\u042d\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0435\u043b\u0430\u0441\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430, \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432. \u041d\u043e \u0438\u0445 \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p> <\/p>\n<p>\u0420\u044f\u0434 \u0443\u0437\u043b\u043e\u0432 \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0438\u0436\u0435) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0431\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a (<a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=blob_plain;f=src\/backend\/utils\/sort\/tuplestore.c\">tuplestore<\/a>). \u0412 \u044d\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/p>\n<p> <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0442\u0438\u043f\u043e\u043c Generation, \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u0449\u0435\u0433\u043e CurrentMemoryContext. \u041d\u0435 \u0432\u0434\u0430\u0432\u0430\u044f\u0441\u044c \u0432 <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=590b045c3\">\u0434\u0435\u0442\u0430\u043b\u0438<\/a>, \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p> <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, EXPLAIN (analyze) \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (Memory \u0438\u043b\u0438 Disk) \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0443\u0437\u043b\u043e\u0432 \u043f\u043b\u0430\u043d\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u043e\u0431\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041a \u044d\u0442\u0438\u043c \u0443\u0437\u043b\u0430\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f:<\/p>\n<p> <\/p>\n<ul>\n<li>Materialize \u2015 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f;<\/li>\n<li>CTE Scan \u2015 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043e\u0431\u0449\u0438\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438;<\/li>\n<li>WindowAgg \u2015 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043e\u043a\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438;<\/li>\n<li>Recursive Union \u2015 \u0434\u043b\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432;<\/li>\n<li>Table Function Scan \u2015 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c JSON_TABLE, XMLTABLE (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 Function Scan).<\/li>\n<\/ul>\n<p> <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0443\u0437\u043b\u0430 Materialize \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 Storage:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (costs off, analyze, timing off, summary off, buffers off)             SELECT * FROM airports a1 CROSS JOIN airports a2;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                              QUERY PLAN                               ----------------------------------------------------------------------  Nested Loop (actual rows=10816 loops=1)    -&gt;  Seq Scan on airports_data ml (actual rows=104 loops=1)    -&gt;  Materialize (actual rows=104 loops=104)          Storage: Memory  Maximum Storage: 35kB          -&gt;  Seq Scan on airports_data ml_1 (actual rows=104 loops=1) (5 rows) <\/code><\/pre>\n<p> <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0434\u043b\u044f CTE \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (analyze, costs off, summary off, timing off, buffers off) WITH b AS MATERIALIZED (   SELECT * FROM bookings ) SELECT * FROM b;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                         QUERY PLAN                          ------------------------------------------------------------  CTE Scan on b (actual rows=2111110 loops=1)    Storage: Disk  Maximum Storage: 67856kB    CTE b      -&gt;  Seq Scan on bookings (actual rows=2111110 loops=1) (4 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u0414\u043b\u044f \u0443\u0437\u043b\u0430 WindowAgg \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b (PARTITION BY). \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u2015 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u0444\u0444\u0435\u043a\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 12% \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432 17-\u0439.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (analyze, costs off, summary off, timing off, buffers off) SELECT book_ref, count(*) OVER (PARTITION BY book_ref) FROM tickets;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                                        QUERY PLAN                                          -------------------------------------------------------------------------------------------  WindowAgg (actual rows=2949857 loops=1)    Storage: Memory  Maximum Storage: 17kB    -&gt;  Index Only Scan using tickets_book_ref_idx on tickets (actual rows=2949857 loops=1)          Heap Fetches: 0 (4 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u041f\u043b\u0430\u043d \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043a\u0430\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0443\u0437\u043b\u0430\u0445 Recursive Union \u0438 CTE Scan.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (analyze, costs off, summary off, timing off, buffers off) WITH RECURSIVE t(n) AS (     VALUES (1)   UNION ALL     SELECT n+1 FROM t WHERE n &lt; 100 ) SELECT sum(n) FROM t;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                           QUERY PLAN                             -----------------------------------------------------------------  Aggregate (actual rows=1 loops=1)    CTE t      -&gt;  Recursive Union (actual rows=100 loops=1)            Storage: Memory  Maximum Storage: 33kB            -&gt;  Result (actual rows=1 loops=1)            -&gt;  WorkTable Scan on t t_1 (actual rows=1 loops=100)                  Filter: (n &lt; 100)                  Rows Removed by Filter: 0    -&gt;  CTE Scan on t (actual rows=100 loops=1)          Storage: Memory  Maximum Storage: 20kB (10 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443\u0437\u0435\u043b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 JSON_TABLE, XMLTABLE.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (analyze, costs off, summary off, timing off, buffers off) SELECT * FROM JSON_TABLE('{\"a\":1}'::jsonb, '$[*]' COLUMNS (a int));<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                         QUERY PLAN                           -------------------------------------------------------------  Table Function Scan on \"json_table\" (actual rows=1 loops=1)    Storage: Memory  Maximum Storage: 17kB (2 rows)<\/code><\/pre>\n<p> <a name=\"commit_3f44959f4\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5112\/\">\u0427\u0442\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=3f44959f4\">3f44959f4<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=1bd4bc85c\">1bd4bc85c<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=b5ee4e520\">b5ee4e520<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=caca6d8d2\">caca6d8d2<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=4e6e375b0\">4e6e375b0<\/a><\/p>\n<p> <\/p>\n<p>\u041f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0447\u0442\u0435\u043d\u0438\u044e \u0431\u0443\u0444\u0435\u0440\u043e\u0432. \u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u0440\u0438 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">17=# EXPLAIN (analyze, buffers, costs off, summary off, timing off) SELECT * FROM flights ORDER BY flight_id ASC;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                              QUERY PLAN                                -----------------------------------------------------------------------  Index Scan using flights_pkey on flights (actual rows=214867 loops=1)    Buffers: shared hit=3499<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"pgsql\">17=# EXPLAIN (analyze, buffers, costs off, summary off, timing off) SELECT * FROM flights ORDER BY flight_id DESC;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">                                   QUERY PLAN                                    --------------------------------------------------------------------------------  Index Scan Backward using flights_pkey on flights (actual rows=214867 loops=1)    Buffers: shared hit=4087<\/code><\/pre>\n<p> <\/p>\n<p>\u0412 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043b\u044e\u0431\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0443\u0444\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2015 3499.<\/p>\n<p> <a name=\"commit_40e2e5e92\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/4995\/\">pg_upgrade: \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=40e2e5e92\">40e2e5e92<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=6d3d2e8e5\">6d3d2e8e5<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=7baa36de5\">7baa36de5<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=46cad8b31\">46cad8b31<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=6ab8f27bc\">6ab8f27bc<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=bbf83cab9\">bbf83cab9<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=9db3018cf\">9db3018cf<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=c34eabfbb\">c34eabfbb<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=cf2f82a37\">cf2f82a37<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=f93f5f7b9\">f93f5f7b9<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=c880cf258\">c880cf258<\/a><\/p>\n<p> <\/p>\n<p>\u0420\u044f\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b pg_upgrade \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043e\u0434\u043d\u043e \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f\u0441\u044c \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p> <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 libpq. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p> <\/p>\n<p>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c &#8212;jobs, \u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p> <\/p>\n<p>\u042d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0441\u0435\u0440\u0438\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 pg_upgrade, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/856498\/#commit_6e16b1e4\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p> <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p><\/blockquote>\n<p> <a name=\"commit_adf97c156\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/4985\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=adf97c156\">adf97c156<\/a><\/p>\n<p> <\/p>\n<p>\u0423\u0441\u043a\u043e\u0440\u0438\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0435.<\/p>\n<p> <a name=\"commit_ca6fde922\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5002\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 JSON<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=ca6fde922\">ca6fde922<\/a><\/p>\n<p> <\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f JSON \u0432 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f SIMD \u043f\u0440\u0438 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043c\u0435\u043d \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0427\u0435\u043c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0435.<\/p>\n<p> <a name=\"commit_ca481d3c9\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5094\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=ca481d3c9\">ca481d3c9<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=c4e44224c\">c4e44224c<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=8dc28d7eb\">8dc28d7eb<\/a><\/p>\n<p> <\/p>\n<p>\u0427\u0438\u0441\u043b\u0430 \u0442\u0438\u043f\u0430 numeric \u0431\u0443\u0434\u0443\u0442 \u0443\u043c\u043d\u043e\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p> <a name=\"commit_9428c001f\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5201\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0442\u0438\u043f\u0430 numeric<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=9428c001f\">9428c001f<\/a><\/p>\n<p> <\/p>\n<p>\u0427\u0438\u0441\u043b\u0430 \u0442\u0438\u043f\u0430 numeric \u0431\u0443\u0434\u0443\u0442 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p> <a name=\"commit_62ddf7ee9\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5226\/\">ANALYZE ONLY \u0438 VACUUM ONLY<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=62ddf7ee9\">62ddf7ee9<\/a><\/p>\n<p> <\/p>\n<p>\u0410\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0438 \u0430\u0432\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043d\u043e \u043d\u0435 \u0432 \u0441\u0430\u043c\u0443 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412 \u043d\u0435\u0439 \u043d\u0435\u0442 \u0441\u0442\u0440\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p> <\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0447\u0438\u0449\u0430\u0442\u044c \u043c\u0435\u0440\u0442\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u0435\u0434\u044c \u0447\u0430\u0441\u0442\u044c \u0441\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041e\u0431\u044b\u0447\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 ANALYZE \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043d\u043e \u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044f\u043c, \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0410 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0441 ONLY, \u043a\u0430\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 DML, \u0434\u043e 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p> <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0431\u043e\u0440 \u0441\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438, \u0431\u0435\u0437 \u0441\u0435\u043a\u0446\u0438\u0439, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">ANALYZE ONLY partitioned_table;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">ANALYZE<\/code><\/pre>\n<p> <\/p>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f VACUUM.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">VACUUM (analyze) ONLY partitioned_table;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">WARNING:  VACUUM ONLY of partitioned table \"partitioned_table\" has no effect VACUUM<\/code><\/pre>\n<p> <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 analyze.<\/p>\n<p> <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ONLY \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b VACUUM \u0438 ANALYZE \u043a\u043e\u0441\u043d\u0443\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u043d\u043e \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430\u043c\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438.<\/p>\n<p> <\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">ANALYZE parent_table;<\/code><\/pre>\n<p> <\/p>\n<p>\u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u0432\u0441\u0435\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c ONLY:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">ANALYZE ONLY parent_table;<\/code><\/pre>\n<p> <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f VACUUM.<\/p>\n<p> <a name=\"commit_17cc5f666\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5130\/\">\u0423\u0442\u043e\u0447\u043d\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=17cc5f666\">17cc5f666<\/a><\/p>\n<p> <\/p>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u0432 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 pg_stat_checkpointer \u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p> <\/p>\n<p>\u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0432 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u043e\u0431\u0449\u0435\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430 (shared_buffers), \u0442\u0430\u043a \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b SLRU, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0432 pg_stat_checkpointer.buffers_written \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0444\u0435\u0440\u044b shared_buffers.<\/p>\n<p> <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435. \u0412 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u0430\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438: \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0438\u0437 shared_buffers, \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0431\u0443\u0444\u0435\u0440\u043e\u0432 SLRU.<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">LOG:  checkpoint complete: wrote 47 buffers (0.3%), wrote 0 SLRU buffers; \u2026<\/code><\/pre>\n<p> <\/p>\n<p>\u0410 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 pg_stat_checkpointer \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0441\u0442\u043e\u043b\u0431\u0446\u0443 buffers_written \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 slru_written.<\/p>\n<p> <\/p>\n<p>\u041b\u0435\u0433\u043a\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u0434\u0432\u0443\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">CHECKPOINT; SELECT pg_stat_reset_shared('checkpointer');<\/code><\/pre>\n<p> <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE bookings_copy AS SELECT * FROM bookings; CHECKPOINT;<\/code><\/pre>\n<p> <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 pg_stat_checkpointer:<\/p>\n<p> <\/p>\n<pre><code class=\"plaintext\">\\! tail -n 1 logfile 2024-11-12 16:56:33.443 MSK [63957] LOG:  checkpoint complete: wrote 2016 buffers (12.3%), wrote 1 SLRU buffers; 0 WAL file(s) added, 5 removed, 5 recycled; write=0.044 s, sync=0.311 s, total=0.773 s; sync files=20, longest=0.226 s, average=0.016 s; distance=165531 kB, estimate=444398 kB; lsn=1\/4A6A8E20, redo lsn=1\/4A6A8DC8<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT buffers_written, slru_written FROM pg_stat_checkpointer;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\"> buffers_written | slru_written -----------------+--------------             2016 |            1 (1 row)<\/code><\/pre>\n<p> <a name=\"commit_ba90eac7a\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5179\/\">pg_stat_statements: \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 SET<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=ba90eac7a\">ba90eac7a<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=dc6851596\">dc6851596<\/a><\/p>\n<p> <\/p>\n<p>\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/732916\/#commit_daa8365a\">\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b<\/a> \u043d\u0430\u0434 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0440\u0435\u0447\u044c \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 SET. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 pg_stat_statements.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT pg_stat_statements_reset();  SET SEARCH_PATH = pg_catalog; SET   search_path  =  public; set search_path=bookings,public;  SET CUSTOM.PARAMETER = 1; SET   CUSTOM.parameter  =  2; set custom.parameter=42;  SELECT queryid, query, calls FROM pg_stat_statements WHERE query ILIKE 'SET%';<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">       queryid        |           query           | calls  ----------------------+---------------------------+-------  -5443897209013767274 | SET CUSTOM.PARAMETER = $1 |     3  -1735366501441382531 | SET SEARCH_PATH = $1      |     3 (2 rows)<\/code><\/pre>\n<p> <a name=\"commit_c297a47c5\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/3388\/\">postgres_fdw_get_connections \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=c297a47c5\">c297a47c5<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=857df3cef\">857df3cef<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=4f08ab554\">4f08ab554<\/a><\/p>\n<p> <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">BEGIN; SELECT count(*) FROM remote_bookings.tickets;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">  count   ---------  2949857 (1 row)<\/code><\/pre>\n<p> <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u0441\u0435\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">postgres_fdw_get_connections<\/a>. \u0410 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0442\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: user_name, user_in_xact \u0438 closed:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT * FROM postgres_fdw_get_connections(check_conn =&gt; true);<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\"> server_name | user_name | valid | used_in_xact | closed -------------+-----------+-------+--------------+--------  demo_srv    | postgres  | t     | t            | f (1 row)<\/code><\/pre>\n<p> <\/p>\n<p>\u0421\u0442\u043e\u043b\u0431\u0435\u0446 <code>user_name<\/code> \u2015 \u044d\u0442\u043e \u0438\u043c\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, <code>used_in_xact<\/code> \u2015 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0430 <code>closed<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p> <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c. \u0418\u043d\u0430\u0447\u0435 \u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c: \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u0435\u0434\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437-\u0437\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p> <a name=\"commit_e7834a1a2\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5107\/\">file_fdw: \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=e7834a1a2\">e7834a1a2<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=a1c4c8a9e\">a1c4c8a9e<\/a><\/p>\n<p> <\/p>\n<p>\u0412 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b COPY <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/841408\/#commit_f5a22789\">\u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c<\/a> \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u043e\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b on_error \u0438 log_verbosity. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 file_fdw \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e COPY, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p> <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430\u043c\u0438:<\/p>\n<p> <\/p>\n<pre><code class=\"bash\">$ cat \/tmp\/t.txt<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">1 \u0434\u0432\u0430 \u0442\u0440\u0438 4<\/code><\/pre>\n<p> <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 c \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">CREATE EXTENSION file_fdw; CREATE SERVER file_server     FOREIGN DATA WRAPPER file_fdw;  CREATE FOREIGN TABLE ft (     id integer ) SERVER file_server OPTIONS (     filename '\/tmp\/t.txt',     on_error 'ignore',     log_verbosity 'verbose' );<\/code><\/pre>\n<p> <\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT * FROM ft;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">NOTICE:  skipping row due to data type incompatibility at line 2 for column \"id\": \"\u0434\u0432\u0430\" NOTICE:  skipping row due to data type incompatibility at line 3 for column \"id\": \"\u0442\u0440\u0438\" NOTICE:  2 rows were skipped due to data type incompatibility  id ----   1   4 (2 rows)<\/code><\/pre>\n<p> <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>silent<\/code> \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 log_verbosity:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">ALTER FOREIGN TABLE ft OPTIONS (SET log_verbosity 'silent');  SELECT * FROM ft;<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\"> id ----   1   4 (2 rows)<\/code><\/pre>\n<p> <a name=\"commit_4eada203a\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5103\/\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f has_largeobject_privilege<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=4eada203a\">4eada203a<\/a><\/p>\n<p> <\/p>\n<p>\u041f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/functions-info.html#FUNCTIONS-INFO-ACCESS\">\u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a> has_*_privilege. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 has_largeobject_privilege.<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">\\lo_import 'logfile' lo_import 24578  GRANT SELECT ON LARGE OBJECT 24578 TO public;  SELECT has_largeobject_privilege('alice', 24578, 'SELECT');<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\"> has_largeobject_privilege ---------------------------  t (1 row)<\/code><\/pre>\n<p> <\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u0438 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0447\u043b\u0435\u043d\u0441\u0442\u0432\u043e \u0432 \u0440\u043e\u043b\u0438, \u0438\u043c\u0435\u044e\u0449\u0435\u0439 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0447\u043b\u0435\u043d\u0441\u0442\u0432\u043e \u0432 \u0440\u043e\u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p> <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE\">\u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/functions-info.html#FUNCTIONS-INFO-ACCESS\">\u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a> has_*_privilege, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 has_domain_privilege. \u0412\u0441\u0451 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e\u043c\u0435\u043d\u044b \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0438\u043f\u0430\u043c\u0438 \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 pg_type. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 has_domain_privilege \u0441 \u0434\u043e\u043c\u0435\u043d\u0430\u043c\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 has_type_privilege. \u041d\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 CREATE DOMAIN, \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043d\u0430 \u0434\u043e\u043c\u0435\u043d\u044b \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 GRANT\u2026 ON DOMAIN. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 has_domain_privilege \u043c\u043e\u0436\u0435\u0442 \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0432\u043e\u0434 \u0432\u043d\u0435\u0441\u0442\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 has_type_privilege \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u043e\u043c\u0435\u043d\u0430\u043c\u0438.<\/p><\/blockquote>\n<p> <a name=\"commit_760162fed\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5132\/\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 crc32 \u0438 crc32c<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=760162fed\">760162fed<\/a><\/p>\n<p> <\/p>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u0443\u043c\u043c CRC-32 \u0438 CRC-32C:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT crc32('42'::bytea), crc32c('42'::bytea);<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">   crc32   |  crc32c    -----------+-----------  841265288 | 779959755 (1 row)<\/code><\/pre>\n<p> <a name=\"commit_28a1121fd\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/4646\/\">\u041a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b: \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e search_path<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=28a1121fd\">28a1121fd<\/a>, <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=0d06a7eac\">0d06a7eac<\/a><\/p>\n<p> <\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/protocol-flow.html#PROTOCOL-FLOW-START-UP\">ParameterStatus<\/a> \u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <em>client_encoding<\/em> \u0438\u043b\u0438 <em>DateStyle<\/em>. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u0435\u0430\u043d\u0441\u0435 (\u043e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 SET) \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043e \u043d\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p> <\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d, \u043d\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c \u0432 \u043d\u0435\u0433\u043e \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>search_path<\/em>. <\/p>\n<p> <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0443\u043b\u0435\u0440\u043e\u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0412 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c, \u043f\u0443\u043b\u0435\u0440 \u0441\u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 <em>search_path<\/em> \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0437\u0430\u043f\u043e\u043c\u043d\u0435\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p> <a name=\"commit_d55322b0d\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/4650\/\">psql: \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=d55322b0d\">d55322b0d<\/a><\/p>\n<p> <\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 psql \u0431\u044b\u043b\u0430 <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/706098\/#commit_5b66de34\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430<\/a> \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b.<\/p>\n<p> <\/p>\n<p>\u0421 \u043d\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/app-psql.html#APP-PSQL-META-COMMAND-PARSE\">\\parse<\/a>, <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/app-psql.html#APP-PSQL-META-COMMAND-BIND-NAMED\">\\bind_named<\/a> \u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/app-psql.html#APP-PSQL-META-COMMAND-CLOSE\">\\close<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">SELECT $2||$1 AS str \\parse q  SELECT * FROM pg_prepared_statements \\gx<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">-[ RECORD 1 ]---+------------------------------ name            | q statement       | SELECT $2||$1 AS str prepare_time    | 2024-11-08 09:30:50.326934+03 parameter_types | {text,text} result_types    | {text} from_sql        | f generic_plans   | 0 custom_plans    | 0<\/code><\/pre>\n<p> <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c q \u0438 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0412\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f.<\/p>\n<p> <\/p>\n<p>\u0414\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u043c\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \\bind_named. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0437\u0430\u0442\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">\\bind_named q 42 'Answer: ' \\g<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">    str      ------------  Answer: 42 (1 row)<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"pgsql\">\\bind_named q 'World!' 'Hello,' \\g<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">     str       --------------  Hello,World! (1 row)<\/code><\/pre>\n<p> <\/p>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (DEALLOCATE):<\/p>\n<p> <\/p>\n<pre><code class=\"pgsql\">\\close q<\/code><\/pre>\n<p> <a name=\"commit_8dfd31290\"><\/a> <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/49\/5116\/\">pg_verifybackup: \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043f\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 tar<\/a><\/strong><br \/> commit: <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commit;h=8dfd31290\">8dfd31290<\/a><\/p>\n<p> <\/p>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/app-pgverifybackup.html\">pg_verifybackup<\/a> \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043f\u0438\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 plain, \u043d\u043e \u0438 tar. \u041a\u043e\u043f\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 tar \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0436\u0430\u0442\u0430:<\/p>\n<p> <\/p>\n<pre><code class=\"bash\">$ pg_basebackup -D backup --format=tar --gzip $ ls -l backup<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">total 569416 -rw------- 1 pal pal    190742 \u0434\u0435\u043a 24 18:57 backup_manifest -rw------- 1 pal pal 582862489 \u0434\u0435\u043a 24 18:57 base.tar.gz -rw------- 1 pal pal     17120 \u0434\u0435\u043a 24 18:57 pg_wal.tar.gz<\/code><\/pre>\n<p> <\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435. \u0423\u0442\u0438\u043b\u0438\u0442\u0430 pg_verifybackup \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 WAL, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 WAL \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/p>\n<p> <\/p>\n<pre><code class=\"bash\">$ pg_verifybackup backup --format=tar --no-parse-wal<\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"plaintext\">backup successfully verified<\/code><\/pre>\n<hr\/>\n<p> <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0451. \u0412\u043f\u0435\u0440\u0435\u0434\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u043e\u044f\u0431\u0440\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/877752\/\"> https:\/\/habr.com\/ru\/articles\/877752\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/j6\/i4\/-6\/j6i4-6-12c-hkh31c75fs5gkgsq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/j6\/i4\/-6\/j6i4-6-12c-hkh31c75fs5gkgsq.png\"\/><\/p>\n<p> <\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/peter.eisentraut.org\/blog\/2023\/10\/10\/commitfest-throughput\">\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435<\/a>, \u0432 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430\u0445 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432. \u041d\u043e \u043f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 18-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u041c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u043f\u0430\u0442\u0447\u0435\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p> <\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0438\u0437 \u0438\u044e\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/856498\/\">2024-07<\/a>.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-446533","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446533","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=446533"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446533\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}