{"id":358362,"date":"2024-05-21T00:10:17","date_gmt":"2024-05-21T00:10:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=358362"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=358362","title":{"rendered":"<span>PostgreSQL 17: \u0427\u0430\u0441\u0442\u044c 2 \u0438\u043b\u0438 \u041a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442 2023-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\/w780q1\/webt\/ey\/ez\/zz\/eyezzzah5p2ur2ophn7rkh6qfec.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ey\/ez\/zz\/eyezzzah5p2ur2ophn7rkh6qfec.jpeg\" data-blurred=\"true\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u043c\u0438 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u0447\u0435\u043c \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0441\u044f \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043e\u0431 \u0438\u044e\u043b\u044c\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0435 \u2015 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0435\u0440\u0438\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/757028\/\">2023-07<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p><a href=\"#commit_f691f5b8\">\u0423\u0434\u0430\u043b\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>old_snapshot_threshold<\/em><\/a><br \/>  <a href=\"#commit_7750fefd\">\u041d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>event_triggers<\/em><\/a><br \/>  <a href=\"#commit_260a1f18\">\u041d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 to_bin \u0438 to_oct<\/a><br \/>  <a href=\"#commit_1e68e43d\">\u041d\u043e\u0432\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 pg_wait_events<\/a><br \/>  <a href=\"#commit_5a3423ad\">EXPLAIN: \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439<\/a><br \/>  <a href=\"#commit_3900a02c\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 WindowAgg<\/a><br \/>  <a href=\"#commit_b0e96f31\">pg_constraint: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL<\/a><br \/>  <a href=\"#commit_11c34b34\">\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f CALL, DEALLOCATE \u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445\u0444\u0430\u0437\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0435\u0439<\/a><br \/>  <a href=\"#commit_59f47fb9\">unaccent: \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445<\/a><br \/>  <a href=\"#commit_f6d4c9cf\">COPY FROM: FORCE_NOT_NULL \u0438 FORCE_NULL<\/a><br \/>  <a href=\"#commit_e48b19c5\">\u0410\u0443\u0434\u0438\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a><br \/>  <a href=\"#commit_13aeaf07\">pg_stat_subscription: \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 worker_type<\/a><br \/>  <a href=\"#commit_f593c551\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f pg_promote \u043f\u0440\u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443<\/a><br \/>  <a href=\"#commit_8c16ad3b\">\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0434\u0438\u0441\u043a\u043e\u043c \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a><br \/>  <a href=\"#commit_c103d073\">pg_restore: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446<\/a><br \/>  <a href=\"#commit_cca97ce6\">pg_basebackup \u0438 pg_receivewal \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c dbname<\/a><br \/>  <a href=\"#commit_b575a26c\">\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u044f\u0434\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a><br \/>  <a href=\"#commit_f347ec76\">psql: \\watch min_rows<\/a><\/p>\n<p>  <a name=\"commit_f691f5b8\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/CACG%3DezYV%2BEvO135fLRdVn-ZusfVsTY6cH1OZqWtezuEYH6ciQA%40mail.gmail.com\">\u0423\u0434\u0430\u043b\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>old_snapshot_threshold<\/em><\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f691f5b8\">f691f5b8<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0432\u0435\u0440\u0441\u0438\u0438 9.6 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>old_snapshot_threshold<\/em>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0441\u043d\u0438\u043c\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u0432\u044b\u0447\u0438\u0449\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0440\u043e\u043a, \u0432\u0438\u0434\u0438\u043c\u044b\u0435 \u0432 \u0441\u043d\u0438\u043c\u043a\u0435. \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c \u0441\u0442\u0440\u043e\u043a \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u0442\u0430\u043a \u0437\u043d\u0430\u043a\u043e\u043c\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Oracle: \u00abSnapshot too old\u00bb.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0430 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0434\u0430\u043b\u0438\u043b\u0438.<\/p>\n<p>  <a name=\"commit_7750fefd\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4013\/\">\u041d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>event_triggers<\/em><\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/7750fefd\">7750fefd<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>event_triggers<\/em> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\/\u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">\\dconfig+ event_triggers<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">               List of configuration parameters    Parameter    | Value | Type |  Context  | Access privileges ----------------+-------+------+-----------+-------------------  event_triggers | on    | bool | superuser | (1 row)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432. \u0420\u0430\u043d\u0435\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/16\/sql-createeventtrigger\">CREATE EVENT TRIGGER<\/a> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u0434\u043d\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n<p>  <a name=\"commit_260a1f18\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4071\/\">\u041d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 to_bin \u0438 to_oct<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/260a1f18\">260a1f18<\/a><\/p>\n<p>  <\/p>\n<p>\u041a \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 to_hex \u0434\u043b\u044f \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0438 \u0432\u043e\u0441\u044c\u043c\u0435\u0440\u0438\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT to_bin(2), to_oct(8), to_hex(16);<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> to_bin | to_oct | to_hex --------+--------+--------  10     | 10     | 10 (1 row)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435<br \/>  <a href=\"https:\/\/www.depesz.com\/2023\/09\/01\/waiting-for-postgresql-17-add-to_bin-and-to_oct\/\">Waiting for PostgreSQL 17 \u2013 Add to_bin() and to_oct(). \u2013 select * from depesz;<\/a><\/p>\n<p>  <a name=\"commit_1e68e43d\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4490\/\">\u041d\u043e\u0432\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 pg_wait_events<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/1e68e43d\">1e68e43d<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e pg_stat_activity \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 wait_event_type \u0438 wait_event \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/monitoring-stats.html#WAIT-EVENT-TABLE\">\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f<\/a> \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \u042d\u0442\u0438 \u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/view-pg-wait-events.html\">pg_wait_events<\/a>.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0427\u0435\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u044f\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438?<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT a.pid, a.state, a.wait_event_type, a.wait_event, w.description FROM pg_stat_activity a JOIN pg_wait_events w      ON (a.wait_event_type = w.type AND a.wait_event = w.name) WHERE a.backend_type = 'checkpointer'\\gx<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-[ RECORD 1 ]---+--------------------------------------------- pid             | 21090 state           | wait_event_type | Activity wait_event      | CheckpointerMain description     | Waiting in main loop of checkpointer process<\/code><\/pre>\n<p>  <a name=\"commit_5a3423ad\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/3688\/\">EXPLAIN: \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/5a3423ad\">5a3423ad<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0432\u044b\u0432\u043e\u0434\u0435 EXPLAIN ANALYZE, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 pg_stat_statements, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 (tuple deforming).<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 ?:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">EXPLAIN (analyze, summary off) WITH pi AS (   SELECT random() x, random() y   FROM generate_series(1,10000000) ) SELECT 4*sum(1-floor(x*x+y*y))\/count(*) val FROM pi;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                                                  QUERY PLAN                                                                    -----------------------------------------------------------------------------------------------------------------------------------------------  Aggregate  (cost=525000.00..525000.02 rows=1 width=8) (actual time=3934.330..3934.331 rows=1 loops=1)    CTE pi      ->  Function Scan on generate_series  (cost=0.00..150000.00 rows=10000000 width=16) (actual time=725.126..1654.054 rows=10000000 loops=1)    ->  CTE Scan on pi  (cost=0.00..200000.00 rows=10000000 width=16) (actual time=725.129..3429.925 rows=10000000 loops=1)  JIT:    Functions: 6    Options: Inlining true, Optimization true, Expressions true, Deforming true    Timing: Generation 0.954 ms (Deform 0.161 ms), Inlining 8.476 ms, Optimization 25.632 ms, Emission 22.098 ms, Total 57.160 ms (8 rows)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Generation \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u043b\u0430\u043d\u0430 \u2015 \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 (\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <em>jit_expressions<\/em>) \u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 (<em>jit_tuple_deforming<\/em>). \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043d\u044f\u043b\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0432 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 (Deform).<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439. \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SET jit_tuple_deforming = off;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u0430\u0441\u0430\u044e\u0449\u0430\u044f\u0441\u044f JIT:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> JIT:    Functions: 5    Options: Inlining true, Optimization true, Expressions true, Deforming false    Timing: Generation 0.665 ms (Deform 0.000 ms), Inlining 15.209 ms, Optimization 25.897 ms, Emission 16.664 ms, Total 58.435 ms<\/code><\/pre>\n<p>  <a name=\"commit_3900a02c\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4334\/\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 WindowAgg<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/3900a02c\">3900a02c<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043d\u0438\u0436\u0430\u043b \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043e\u043a\u043e\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043e\u043a\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a. <\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 nested loop \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446, \u0442. \u043a. \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443, \u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=> EXPLAIN (analyze, settings) SELECT t.ticket_no, SUM(tf.amount) OVER () FROM tickets t JOIN ticket_flights tf ON t.ticket_no = tf.ticket_no LIMIT 1;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                                                           QUERY PLAN                                                                            ----------------------------------------------------------------------------------------------------------------------------------------------------------------  Limit  (cost=0.56..0.86 rows=1 width=46) (actual time=30416.237..30416.239 rows=1 loops=1)    ->  WindowAgg  (cost=0.56..2525161.21 rows=8391708 width=46) (actual time=30416.236..30416.237 rows=1 loops=1)          ->  Nested Loop  (cost=0.56..2420264.86 rows=8391708 width=20) (actual time=0.049..27742.105 rows=8391852 loops=1)                ->  Seq Scan on tickets t  (cost=0.00..78913.45 rows=2949845 width=14) (actual time=0.015..287.636 rows=2949857 loops=1)                ->  Index Scan using ticket_flights_pkey on ticket_flights tf  (cost=0.56..0.76 rows=3 width=20) (actual time=0.007..0.009 rows=3 loops=2949857)                      Index Cond: (ticket_no = t.ticket_no)  Settings: jit = 'off', search_path = 'bookings, public'  Planning Time: 0.456 ms  Execution Time: 30454.862 ms (9 rows)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043b\u0430\u043d\u0430 \u0441 \u0443\u0437\u043b\u043e\u043c WindowAgg. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0432\u043d\u0430 0.56, \u0445\u043e\u0442\u044f \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u0448\u043b\u043e ~30 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  <\/p>\n<p>\u0412 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0443\u043c\u0435\u0441\u0442\u043d\u044b\u0439 hash join, \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=> EXPLAIN (analyze, settings) SELECT t.ticket_no, SUM(tf.amount) OVER () FROM tickets t JOIN ticket_flights tf ON t.ticket_no = tf.ticket_no LIMIT 1;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                                                   QUERY PLAN                                                                     -------------------------------------------------------------------------------------------------------------------------------------------------  Limit  (cost=523778.31..523778.31 rows=1 width=46) (actual time=7157.639..7157.642 rows=1 loops=1)    ->  WindowAgg  (cost=523778.31..523778.36 rows=8392150 width=46) (actual time=7157.638..7157.640 rows=1 loops=1)          ->  Hash Join  (cost=130215.56..418876.48 rows=8392150 width=20) (actual time=740.005..5075.390 rows=8391852 loops=1)                Hash Cond: (tf.ticket_no = t.ticket_no)                ->  Seq Scan on ticket_flights tf  (cost=0.00..153881.50 rows=8392150 width=20) (actual time=0.066..794.699 rows=8391852 loops=1)                ->  Hash  (cost=78938.47..78938.47 rows=2949847 width=14) (actual time=737.972..737.973 rows=2949857 loops=1)                      Buckets: 262144  Batches: 32  Memory Usage: 6190kB                      ->  Seq Scan on tickets t  (cost=0.00..78938.47 rows=2949847 width=14) (actual time=0.029..307.040 rows=2949857 loops=1)  Settings: search_path = 'bookings, public', jit = 'off'  Planning Time: 0.331 ms  Execution Time: 7202.957 ms (11 rows)<\/code><\/pre>\n<p>  <a name=\"commit_b0e96f31\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/3869\/\">pg_constraint: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/b0e96f31\">b0e96f31<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 pg_constraint \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439, \u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439, \u0442\u0438\u043f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u2015 NOT NULL. \u041f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL \u0432 pg_constraint \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u0435\u0441\u0435\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0439, \u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u2014 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL \u0432 pg_constraint \u0438\u043c\u0435\u044e\u0442 \u0442\u0438\u043f <code>contype = 'n':<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE t (     col1 int NOT NULL,     col2 int NOT NULL );  SELECT conname, contype, conkey FROM pg_constraint WHERE conrelid = 't'::regclass;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">     conname     | contype | conkey -----------------+---------+--------  t_col1_not_null | n       | {1}  t_col2_not_null | n       | {2} (2 rows)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">ALTER TABLE t DROP CONSTRAINT t_col2_not_null;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \\d+:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">postgres@postgres(17.0)=# \\d+ t<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                            Table \"public.t\"  Column |  Type   | Collation | Nullable | Default | Storage | Compression | Stats target | Description --------+---------+-----------+----------+---------+---------+-------------+--------------+-------------  col1   | integer |           | not null |         | plain   |             |              |  col2   | integer |           |          |         | plain   |             |              | Not-null constraints:     \"t_col1_not_null\" NOT NULL \"col1\" Access method: heap<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (NOT VALID) \u0438\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 (DEFERRED). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0432 pg_constraint \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b.<\/p>\n<p>  <a name=\"commit_11c34b34\"><\/a>  <\/p>\n<p><strong>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/B44FA29D-EBD0-4DD9-ABC2-16F1CB087074%40amazon.com\">CALL<\/a>, <a href=\"https:\/\/commitfest.postgresql.org\/44\/4468\/\">DEALLOCATE \u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445\u0444\u0430\u0437\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0435\u0439<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/11c34b34\">11c34b34<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/638d42a3\">638d42a3<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/bb45156f\">bb45156f<\/a><\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0432 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 CALL \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 pg_stat_statements \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CALL p(1); CALL p(2); CALL p(3);  SELECT queryid, query, calls                                                                                FROM pg_stat_statements WHERE query ILIKE 'CALL%';<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">       queryid       |   query    | calls ---------------------+------------+-------  7076031282516132618 | CALL p($1) |     3 (1 row)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445\u0444\u0430\u0437\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0435\u0439 (\u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043c\u043c\u0438\u0442) \u0438 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 DEALLOCATE (\u0442\u0440\u0435\u0442\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442).<\/p>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435<br \/>  <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/718100\/#commit_3db72ebc\">\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f DDL \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434<\/a><br \/>  <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/732916\/#commit_daa8365a\">\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f DDL \u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435<\/a><\/p>\n<p>  <a name=\"commit_59f47fb9\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4511\/\">unaccent: \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/59f47fb9\">59f47fb9<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c unaccent, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0438\u043b\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c. \u0420\u0430\u043d\u044c\u0448\u0435 \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0438 \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043e\u0431\u0440\u0435\u0437\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>  <a name=\"commit_f6d4c9cf\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/3896\/\">COPY FROM: FORCE_NOT_NULL \u0438 FORCE_NULL<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f6d4c9cf\">f6d4c9cf<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b FORCE_NOT_NULL \u0438 FORCE_NULL \u043a\u043e\u043c\u0430\u043d\u0434\u044b COPY \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e, \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 9.0 \u0438 9.4 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438 \u044f\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b <code>*<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE t (col1 text NOT NULL, col2 text NOT NULL);  COPY t FROM STDIN WITH (FORMAT csv, FORCE_NOT_NULL *);<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Enter data to be copied followed by a newline. End with a backslash and a period on a line by itself, or an EOF signal. >> \"\",\"\" >> \\. COPY 1<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT * FROM t WHERE col1 = '' and col2 = '';<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> col1 | col2 ------+------       | (1 row)<\/code><\/pre>\n<p>  <a name=\"commit_e48b19c5\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/CAFdbL1N7-GF-ZXKaB3XuGA%2BCkSmnjFvqb8hgjMnDfd%2BuhL2u-A%40mail.gmail.com\">\u0410\u0443\u0434\u0438\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/e48b19c5\">e48b19c5<\/a><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0442\u043e \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 log_connections \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (117) \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u00abtrust\u00bb \u0432 pg_hba.conf:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">2023-10-19 11:40:07.609 MSK [111233] LOG:  connection authenticated: user=\"postgres\" method=trust (\/home\/pal\/master\/data\/pg_hba.conf:117) 2023-10-19 11:40:07.609 MSK [111233] LOG:  connection authorized: user=postgres database=demo application_name=psql<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u00abtrust\u00bb \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f SYSTEM_USER \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 NULL \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435<br \/>  <a href=\"https:\/\/www.depesz.com\/2023\/09\/01\/waiting-for-postgresql-17-generate-new-log-for-trust-connections-under-log_connections\/\">Waiting for PostgreSQL 17 \u2013 Generate new LOG for \u201ctrust\u201d connections under log_connections \u2013 select * from depesz;<\/a><\/p>\n<p>  <a name=\"commit_13aeaf07\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4503\/\">pg_stat_subscription: \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 worker_type<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/13aeaf07\">13aeaf07<\/a><\/p>\n<p>  <\/p>\n<p>\u041d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 worker_type \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/monitoring-stats.html#MONITORING-PG-STAT-SUBSCRIPTION\">pg_stat_subscription<\/a> \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0437\u0430 \u0441\u0435\u0431\u044f: <code>apply<\/code>, <code>parallel apply<\/code> \u0438 <code>table synchronization<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  <a name=\"commit_f593c551\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4504\/\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f pg_promote \u043f\u0440\u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f593c551\">f593c551<\/a><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0440\u0435\u043f\u043b\u0438\u043a\u0443 \u2015 \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 pg_promote. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 false. \u0418 \u043d\u0435\u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0435 \u0443\u043b\u043e\u0436\u0438\u043b\u0438\u0441\u044c \u0432 \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435,<\/li>\n<li>\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b SIGUSR1 \u043f\u043e\u0441\u0442\u043c\u0430\u0441\u0442\u0435\u0440\u0443,<\/li>\n<li>\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u0442\u043c\u0430\u0441\u0442\u0435\u0440 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u043e\u0448\u0438\u0431\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f pg_promote \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c false \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430, \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<\/p>\n<p>  <a name=\"commit_8c16ad3b\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4467\/\">\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0434\u0438\u0441\u043a\u043e\u043c \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/8c16ad3b\">8c16ad3b<\/a><\/p>\n<p>  <\/p>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0438\u0448\u0443\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0434\u0438\u0441\u043a, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>--synch-method<\/code>. \u0420\u0435\u0447\u044c \u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u0445: initdb, pg_basebackup, pg_checksums, pg_dump, pg_rewind \u0438 pg_upgrade.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>--synch-method=fsync<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043b\u0438\u043d\u0443\u043a\u0441-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>syncfs<\/code> \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0440\u0430\u0437\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0430 fsync \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b. \u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u0435\u0441\u043b\u0438 \u0441 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b: \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u044c. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/syncfs.html\">Appendix O. syncfs() Caveats<\/a>, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<p>  <a name=\"commit_c103d073\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4452\/\">pg_restore: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/c103d073\">c103d073<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/5af0263a\">5af0263a<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/9bfd44bb\">9bfd44bb<\/a><\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 pg_restore \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438. \u0420\u0435\u0447\u044c \u043e \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u0445 \u0442\u044b\u0441\u044f\u0447 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441-\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u0435 \u043d\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443. \u0420\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0442\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0430\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c: \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u043e\u0441\u0442\u0430\u0438\u0432\u0430\u043b\u0438 \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u043a\u0443\u0447\u0443. \u0422\u0435\u043f\u0435\u0440\u044c pg_restore \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u043f\u0438\u0439 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0446.<\/p>\n<p>  <a name=\"commit_cca97ce6\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4435\/\">pg_basebackup \u0438 pg_receivewal \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c dbname<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/cca97ce6\">cca97ce6<\/a><\/p>\n<p>  <\/p>\n<p>pg_basebackup \u0438 pg_receivewal \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 dbname \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0412\u043e\u043e\u0431\u0449\u0435 \u043e\u043d \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u044d\u0442\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c, \u0432\u0435\u0434\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u0438 WAL \u2014 \u044d\u0442\u043e \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u0441\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 pgbouncer, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 pgbouncer \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2015 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u041d\u043e \u0435\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0442, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 \u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  <a name=\"commit_b575a26c\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4275\/\">\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u044f\u0434\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/b575a26c\">b575a26c<\/a><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \\df, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=> \\df string_agg<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                            List of functions    Schema   |    Name    | Result data type | Argument data types | Type ------------+------------+------------------+---------------------+------  pg_catalog | string_agg | bytea            | bytea, bytea        | agg  pg_catalog | string_agg | text             | text, text          | agg (2 rows)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043e\u0434\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=> \\df string_agg<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                List of functions    Schema   |    Name    | Result data type |     Argument data types      | Type ------------+------------+------------------+------------------------------+------  pg_catalog | string_agg | bytea            | value bytea, delimiter bytea | agg  pg_catalog | string_agg | text             | value text, delimiter text   | agg (2 rows)<\/code><\/pre>\n<p>  <a name=\"commit_f347ec76\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/44\/4347\/\">psql: \\watch min_rows<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f347ec76\">f347ec76<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \\watch \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/732916\/#commit_00beecfe\">count<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \\watch. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0442\u0440\u043e\u043a, \u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 min_rows, \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE TABLE job (id int, status text DEFAULT 'NEW'); INSERT INTO job VALUES (1),(2),(3);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u0432\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">WITH process_job AS (     UPDATE job SET status = 'PROCESSED'     WHERE id = (SELECT id                 FROM job                 WHERE status = 'NEW'                 ORDER BY id LIMIT 1) ) SELECT * FROM job WHERE status = 'NEW' \\watch min_rows=1<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Mon 16 Oct 2023 05:55:53 PM MSK (every 2s)   id | status ----+--------   1 | NEW   2 | NEW   3 | NEW (3 rows)  Mon 16 Oct 2023 05:55:55 PM MSK (every 2s)   id | status ----+--------   2 | NEW   3 | NEW (2 rows)  Mon 16 Oct 2023 05:55:57 PM MSK (every 2s)   id | status ----+--------   3 | NEW (1 row)  Mon 16 Oct 2023 05:55:59 PM MSK (every 2s)   id | status ----+-------- (0 rows)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435<br \/>  <a href=\"https:\/\/www.depesz.com\/2023\/09\/07\/waiting-for-postgresql-17-allow-watch-queries-to-stop-on-minimum-rows-returned\/\">Waiting for PostgreSQL 17 \u2013 Allow \\watch queries to stop on minimum rows returned \u2013 select * from depesz;<\/a><\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0451. \u0416\u0434\u0435\u043c \u043d\u043e\u044f\u0431\u0440\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/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\/769598\/\"> https:\/\/habr.com\/ru\/articles\/769598\/<\/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\/w780q1\/webt\/ey\/ez\/zz\/eyezzzah5p2ur2ophn7rkh6qfec.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ey\/ez\/zz\/eyezzzah5p2ur2ophn7rkh6qfec.jpeg\" data-blurred=\"true\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u043c\u0438 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u0447\u0435\u043c \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0441\u044f \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043e\u0431 \u0438\u044e\u043b\u044c\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0435 \u2015 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0435\u0440\u0438\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/757028\/\">2023-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-358362","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358362","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=358362"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358362\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}