{"id":363524,"date":"2024-05-21T01:57:53","date_gmt":"2024-05-21T01:57:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=363524"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=363524","title":{"rendered":"<span>PostgreSQL 17: \u0427\u0430\u0441\u0442\u044c 3 \u0438\u043b\u0438 \u041a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442 2023-11<\/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\/rs\/kg\/fj\/rskgfj3h-q7cnbocukddxy4aqog.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/rs\/kg\/fj\/rskgfj3h-q7cnbocukddxy4aqog.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u043e\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442 \u043f\u0440\u0438\u043d\u0435\u0441 \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e! \u0411\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0439 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443.<\/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 \u0438 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430\u0445 \u2015 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0441\u0435\u0440\u0438\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/757028\/\">2023-07<\/a>, <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/769598\/\">2023-09<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p><a href=\"#commit_e83d1b0c\">\u0422\u0440\u0438\u0433\u0433\u0435\u0440 ON LOGIN<\/a><br \/>  <a href=\"#commit_f21848de\">\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f REINDEX<\/a><br \/>  <a href=\"#commit_2b5154be\">ALTER OPERATOR: commutator, negator, hashes, merges<\/a><br \/>  <a href=\"#commit_a5cf808b\">pg_dump &#8212;filter=dump.txt<\/a><br \/>  <a href=\"#commit_d1379ebf\">psql: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><br \/>  <a href=\"#commit_dc9f8a79\">pg_stat_statements: \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441\u0431\u0440\u043e\u0441 min\/max \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/a><br \/>  <a href=\"#commit_96f05261\">pg_stat_checkpointer: \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_bc3c8db8\">pg_stats: \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432<\/a><br \/>  <a href=\"#commit_d3d55ce5\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0430\u043c\u043e\u0439 \u0441 \u0441\u043e\u0431\u043e\u0439<\/a><br \/>  <a href=\"#commit_f7816aec\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 CTE<\/a><br \/>  <a href=\"#commit_5d8aa8bc\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c<\/a><br \/>  <a href=\"#commit_e0b1ee17\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443<\/a><br \/>  <a href=\"#commit_c789f0f6\">dblink, postgres_fdw: \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f<\/a><br \/>  <a href=\"#commit_29d0a77f\">\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><br \/>  <a href=\"#commit_7c3fb505\">\u0416\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><br \/>  <a href=\"#commit_a02b37fc\">Unicode: \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><br \/>  <a href=\"#commit_526fe0d7\">\u041d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f xmltext<\/a><br \/>  <a href=\"#commit_97957fdb\">\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 AT LOCAL<\/a><br \/>  <a href=\"#commit_519fc1bd\">\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b<\/a><br \/>  <a href=\"#commit_2d870b4a\">ALTER SYSTEM \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438<\/a><br \/>  <a href=\"#commit_721856ff\">\u0421\u0431\u043e\u0440\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432<\/a><\/p>\n<p>  <a name=\"commit_e83d1b0c\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/2900\/\">\u0422\u0440\u0438\u0433\u0433\u0435\u0440 ON LOGIN<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/e83d1b0c\">e83d1b0c<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE FUNCTION check_login() RETURNS event_trigger AS $$ BEGIN     IF session_user = 'postgres' THEN RETURN; END IF;      IF to_char(current_date, 'DY') IN ('SAT','SUN')     THEN         RAISE '\u0425\u043e\u0440\u043e\u0448\u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445, \u0443\u0432\u0438\u0434\u0438\u043c\u0441\u044f \u0432 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a!';     END IF; END; $$ LANGUAGE plpgsql;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u0430\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE EVENT TRIGGER check_login     ON LOGIN     EXECUTE FUNCTION check_login();<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438, \u0447\u0442\u043e \u043f\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c, \u043a \u0432\u0441\u0435\u043e\u0431\u0449\u0435\u043c\u0443 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044e, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u0448\u0430\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443. ?<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ psql -U alice -d postgres<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">psql: error: connection to server on socket \"\/tmp\/.s.PGSQL.5401\" failed: FATAL:  \u0425\u043e\u0440\u043e\u0448\u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445, \u0443\u0432\u0438\u0434\u0438\u043c\u0441\u044f \u0432 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a! CONTEXT:  PL\/pgSQL function check_login() line 6 at RAISE<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435<br \/>  <a href=\"https:\/\/www.depesz.com\/2023\/10\/24\/waiting-for-postgresql-17-add-support-event-triggers-on-authenticated-login\/\">Waiting for PostgreSQL 17 \u2013 Add support event triggers on authenticated login \u2013 select * from depesz;<\/a><\/p>\n<p>  <a name=\"commit_f21848de\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4462\/\">\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u043b\u044f REINDEX<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f21848de\">f21848de<\/a><\/p>\n<p>  <\/p>\n<p>\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b REINDEX. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ddl_command_start \u0438 ddl_command_end.<\/p>\n<p>  <a name=\"commit_2b5154be\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4389\/\">ALTER OPERATOR: commutator, negator, hashes, merges<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/2b5154be\">2b5154be<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/sql-alteroperator.html\">ALTER OPERATOR<\/a> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0443\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 (COMMUTATOR) \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0434\u043b\u044f \u043d\u0435\u0433\u043e (NEGATOR), \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0435 \u0431\u044b\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 CREATE OPERATOR. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c (HASHES) \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0441\u043b\u0438\u044f\u043d\u0438\u0435\u043c (MERGES).<\/p>\n<p>  <a name=\"commit_a5cf808b\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/2573\/\">pg_dump &#8212;filter=dump.txt<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/a5cf808b\">a5cf808b<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u043e\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <code>--filter<\/code> \u0443\u0442\u0438\u043b\u0438\u0442\u044b pg_dump \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ cat dump.txt<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">include table      bookings exclude table_data bookings<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ pg_dump -d demo --filter=dump.txt |grep -v -E '^SET|^SELECT|^--|^$'<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">CREATE TABLE bookings.bookings (     book_ref character(6) NOT NULL,     book_date timestamp with time zone NOT NULL,     total_amount numeric(10,2) NOT NULL ); ALTER TABLE bookings.bookings OWNER TO postgres; COMMENT ON TABLE bookings.bookings IS 'Bookings'; COMMENT ON COLUMN bookings.bookings.book_ref IS 'Booking number'; COMMENT ON COLUMN bookings.bookings.book_date IS 'Booking date'; COMMENT ON COLUMN bookings.bookings.total_amount IS 'Total booking cost'; ALTER TABLE ONLY bookings.bookings     ADD CONSTRAINT bookings_pkey PRIMARY KEY (book_ref);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0444\u0430\u0439\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/app-pgdump.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u043a \u0443\u0442\u0438\u043b\u0438\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 pg_dump \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u041e\u0421.<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>--filter<\/code> \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 pg_dumpall \u0438 pg_restore.<\/p>\n<p>  <a name=\"commit_d1379ebf\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4593\/\">psql: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/d1379ebf\">d1379ebf<\/a><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b psql \u0431\u044b\u043b\u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0445\u0435\u043c, \u0445\u043e\u0442\u044f \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u0430\u043b\u0435\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0443 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043b\u044e\u0431\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">CREATE SCHEMA s;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b \u0435\u0435 \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043c\u0435\u0435\u0442 \u043e\u0431\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438: USAGE \u0438 CREATE. \u041d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \\dn+ \u0438\u0445 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 pg_namespace.nspacl, \u0442\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 NULL:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# SELECT nspacl IS NULL FROM pg_namespace WHERE oid = 's'::regnamespace;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> ?column? ----------  t<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# \\pset null '(null)' 16=# \\dn+ s<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                  List of schemas  Name |  Owner   | Access privileges | Description ------+----------+-------------------+-------------  s    | postgres |                   |<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \\pset null \u043d\u0435 \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u0430 \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 NULL \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041a\u043e\u043c\u0430\u043d\u0434\u044b psql \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b GRANT \u0438\u043b\u0438 REVOKE \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0443\u0442 \u044f\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u0434\u0430\u044e\u0442 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u044e\u0442 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043d\u0430 \u0441\u0445\u0435\u043c\u0443. \u041f\u043e \u0441\u0443\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0434\u043d\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# GRANT USAGE ON SCHEMA s TO public; 16=# REVOKE USAGE ON SCHEMA s FROM public;  16=# \\dn+ s<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                   List of schemas  Name |  Owner   |  Access privileges   | Description ------+----------+----------------------+-------------  s    | postgres | postgres=UC\/postgres |<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c \u0443 \u0441\u0435\u0431\u044f \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 (\u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e):<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# REVOKE ALL ON SCHEMA s FROM postgres;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 pg_namespace.nspacl \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0438\u043f\u0430 aclitem[]. \u041f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u2014 \u044d\u0442\u043e \u043d\u0435 NULL, \u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b?<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# \\dn+ s<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                  List of schemas  Name |  Owner   | Access privileges | Description ------+----------+-------------------+-------------  s    | postgres |                   |<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043a pg_namespace.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0432 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \\pset null \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f NULL:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=# CREATE SCHEMA s;  17=# \\pset null '(null)' 17=# \\dn+ s<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                  List of schemas  Name |  Owner   | Access privileges | Description ------+----------+-------------------+-------------  s    | postgres | (null)            | (null)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 (\u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432) \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>(none)<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=# REVOKE ALL ON SCHEMA s FROM postgres; 17=# \\dn+ s<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                  List of schemas  Name |  Owner   | Access privileges | Description ------+----------+-------------------+-------------  s    | postgres | (none)            | (null)<\/code><\/pre>\n<p>  <a name=\"commit_dc9f8a79\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/3048\/\">pg_stat_statements: \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441\u0431\u0440\u043e\u0441 min\/max-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/dc9f8a79\">dc9f8a79<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 pg_stat_statements \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 stats<em>since, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 min\/max<\/em>* \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432\u044b\u0437\u043e\u0432\u043e\u043c pg_stat_stetments_reset \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c minmax_only. \u0412\u0440\u0435\u043c\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 minmax_stats_since.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 pg_stat_statements. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0431\u0440\u043e\u0441\u0430 \u0432\u0441\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u043d\u0438\u043c\u043e\u0432.<\/p>\n<p>  <a name=\"commit_96f05261\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4014\/\">pg_stat_checkpointer: \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:\/\/github.com\/postgres\/postgres\/commit\/96f05261\">96f05261<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/74604a37\">74604a37<\/a><\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \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-BGWRITER-VIEW\">pg_stat_bgwriter<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0432 pg_stat_bgwriter \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u0432 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/monitoring-stats.html#MONITORING-PG-STAT-CHECKPOINTER-VIEW\">pg_stat_checkpointer<\/a> (\u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442).<\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u043e\u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u044b buffers_backend \u0438 buffers_backend_fsync \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0438\u0437 pg_stat_bgwriter, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u0443\u044e \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \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-IO-VIEW\">pg_stat_io<\/a> (\u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043c\u043c\u0438\u0442).<\/p>\n<p>  <a name=\"commit_bc3c8db8\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/3184\/\">pg_stats: \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/bc3c8db8\">bc3c8db8<\/a><\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0434\u043b\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 pg_statistic. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 pg_stats, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/view-pg-stats.html\">pg_stats<\/a> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0442\u043e\u043b\u0431\u0446\u044b range_length_histogram, range_empty_frac, range_bounds_histogram.<\/p>\n<p>  <a name=\"commit_d3d55ce5\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/1712\/\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0430\u043c\u043e\u0439 \u0441 \u0441\u043e\u0431\u043e\u0439<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/d3d55ce5\">d3d55ce5<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u043b\u043e\u0445\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u0430 \u0441 \u0441\u043e\u0431\u043e\u0439, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 SQL \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442. \u0410\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 ORM, \u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u043a\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b bookings \u0441\u0430\u043c\u043e\u0439 \u0441 \u0441\u043e\u0431\u043e\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=# EXPLAIN (costs off) WITH b AS (     SELECT book_ref FROM bookings ) SELECT * FROM bookings WHERE book_ref IN (SELECT book_ref FROM b);<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">            QUERY PLAN             ----------------------------------  Seq Scan on bookings    Filter: (book_ref IS NOT NULL)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <em>enable_self_join_removal<\/em>. \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">17=# SET enable_self_join_removal = off;  17=# EXPLAIN (costs off) WITH b AS (     SELECT book_ref FROM bookings ) SELECT * FROM bookings WHERE book_ref IN (SELECT book_ref FROM b);<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                       QUERY PLAN                        --------------------------------------------------------  Hash Join    Hash Cond: (bookings.book_ref = bookings_1.book_ref)    ->  Seq Scan on bookings    ->  Hash          ->  Seq Scan on bookings bookings_1<\/code><\/pre>\n<p>  <a name=\"commit_f7816aec\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4510\/\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 CTE<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/f7816aec\">f7816aec<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e CTE \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c jit):<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# EXPLAIN (analyze,timing off) WITH b AS MATERIALIZED (     SELECT book_ref FROM bookings ) SELECT * FROM bookings WHERE book_ref IN (SELECT book_ref FROM b);<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                                    QUERY PLAN                                                      -------------------------------------------------------------------------------------------------------------------  Nested Loop  (cost=82058.51..83469.66 rows=1055555 width=21) (actual rows=2111110 loops=1)    CTE b      ->  Seq Scan on bookings bookings_1  (cost=0.00..34558.10 rows=2111110 width=7) (actual rows=2111110 loops=1)    ->  HashAggregate  (cost=47499.98..47501.98 rows=200 width=28) (actual rows=2111110 loops=1)          Group Key: b.book_ref          Batches: 141  Memory Usage: 11113kB  Disk Usage: 57936kB          ->  CTE Scan on b  (cost=0.00..42222.20 rows=2111110 width=28) (actual rows=2111110 loops=1)    ->  Index Scan using bookings_pkey on bookings  (cost=0.43..8.37 rows=1 width=21) (actual rows=1 loops=2111110)          Index Cond: (book_ref = b.book_ref)  Planning Time: 0.237 ms  Execution Time: 10847.689 ms<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c CTE \u043f\u043e book_ref, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c (\u0443\u0437\u0435\u043b HashAggregate). \u041d\u043e book_ref \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0442\u0430\u0431\u043b\u0438\u0446\u044b bookings, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u0441\u043b\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u0442\u0435 \u0436\u0435 ~2 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430, \u0430 \u043d\u0435 200 \u0441\u0442\u0440\u043e\u043a, \u043a\u0430\u043a \u0432 \u043e\u0446\u0435\u043d\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u2015 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (nested loop) CTE \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 CTE, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043f\u043b\u0430\u043d\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0412\u043e\u0442 \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                                    QUERY PLAN                                                      -------------------------------------------------------------------------------------------------------------------  Hash Semi Join  (cost=117601.18..222997.93 rows=2111110 width=21) (actual rows=2111110 loops=1)    Hash Cond: (bookings.book_ref = b.book_ref)    CTE b      ->  Seq Scan on bookings bookings_1  (cost=0.00..34558.10 rows=2111110 width=7) (actual rows=2111110 loops=1)    ->  Seq Scan on bookings  (cost=0.00..34558.10 rows=2111110 width=21) (actual rows=2111110 loops=1)    ->  Hash  (cost=42222.20..42222.20 rows=2111110 width=28) (actual rows=2111110 loops=1)          Buckets: 131072  Batches: 32  Memory Usage: 3529kB          ->  CTE Scan on b  (cost=0.00..42222.20 rows=2111110 width=28) (actual rows=2111110 loops=1)  Planning Time: 0.127 ms  Execution Time: 1556.576 ms<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u0435\u0437 \u043b\u0438\u0448\u043d\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044f CTE \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f ~ \u0432 7 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>  <a name=\"commit_5d8aa8bc\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4605\/\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a: \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/5d8aa8bc\">5d8aa8bc<\/a><\/p>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0439? \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# EXPLAIN (costs off, analyze, timing off, summary off) SELECT * FROM tickets WHERE ticket_no = '0005432' AND ticket_no = '0005000';<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                           QUERY PLAN                             -----------------------------------------------------------------  Result (actual rows=0 loops=1)    One-Time Filter: false    ->  Index Scan using tickets_pkey on tickets (never executed)          Index Cond: (ticket_no = '0005432'::bpchar)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0432\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b tickets \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0430\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0441\u044f \u0438 \u0443\u0441\u043f\u0435\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0443\u0441\u0438\u043b\u0438\u044f \u043d\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0436\u0435 \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u043b\u0430\u043d \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">           QUERY PLAN            --------------------------------  Result (actual rows=0 loops=1)    One-Time Filter: false<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u043d\u0430 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c, \u0434\u0430 \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0435\u0435.<\/p>\n<p>  <a name=\"commit_e0b1ee17\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4434\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/e0b1ee17\">e0b1ee17<\/a><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0438\u043f\u0430 B-\u0434\u0435\u0440\u0435\u0432\u043e, \u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443. \u0410 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u0442\u043e \u0438 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0442\u043e\u0436\u0435 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u0447\u0435\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043e\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 40 \u0442\u044b\u0441\u044f\u0447 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432 16-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">16=# EXPLAIN (analyze, buffers, costs off, timing off) SELECT * FROM tickets WHERE ticket_no > '0005432' AND ticket_no &lt; '0005434';<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                     QUERY PLAN                                       -------------------------------------------------------------------------------------  Index Scan using tickets_pkey on tickets (actual rows=1469571 loops=1)    Index Cond: ((ticket_no > '0005432'::bpchar) AND (ticket_no &lt; '0005434'::bpchar))    Buffers: shared hit=10675 read=30185  Planning:    Buffers: shared read=4  Planning Time: 0.214 ms  Execution Time: 683.801 ms<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 17-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">                                     QUERY PLAN                                       -------------------------------------------------------------------------------------  Index Scan using tickets_pkey on tickets (actual rows=1469571 loops=1)    Index Cond: ((ticket_no > '0005432'::bpchar) AND (ticket_no &lt; '0005434'::bpchar))    Buffers: shared hit=10690 read=30170  Planning:    Buffers: shared read=4  Planning Time: 0.268 ms  Execution Time: 237.177 ms<\/code><\/pre>\n<p>  <a name=\"commit_c789f0f6\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4506\/\">dblink, postgres_fdw: \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/c789f0f6\">c789f0f6<\/a>, <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/d61f2538\">d61f2538<\/a><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/dblink.html\">dblink<\/a> \u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/devel\/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">postgres_fdw<\/a> \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/757028\/#commit_c9af0546\">\u043d\u043e\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c<\/a> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e.<\/p>\n<p>  <a name=\"commit_29d0a77f\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4273\/\">\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f: \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/29d0a77f\">29d0a77f<\/a><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 pg_upgrade \u2015 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0430 \u0432\u043e\u0442 \u0441\u043b\u043e\u0442\u044b \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435\u0442. \u042d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c pg_upgrade \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043b\u043e\u0442\u044b \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"commit_7c3fb505\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/3492\/\">\u0416\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/7c3fb505\">7c3fb505<\/a><\/p>\n<p>  <\/p>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em><a href=\"https:\/\/www.postgresql.org\/docs\/devel\/runtime-config-logging.html#GUC-LOG-REPLICATION-COMMANDS\">log_replication_commands<\/a><\/em>, \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438\/\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0442\u043e\u0432 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 wal sender.<\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0442\u044b \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 (\u0440\u0435\u043f\u043b\u0438\u043a\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0434\u0440.).<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c <em>log_replication_commands<\/em> \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 pg_basebackup. \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">LOG:  acquired physical replication slot \"pg_basebackup_339820\" \u2026 LOG:  released physical replication slot \"pg_basebackup_339820\"<\/code><\/pre>\n<p>  <a name=\"commit_a02b37fc\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4604\/\">Unicode: \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/a02b37fc\">a02b37fc<\/a><\/p>\n<p>  <\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f unicode_assigned \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u044b \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 Unicode:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT unicode_assigned('\u041f\u0440\u0438\u0432\u0435\u0442, \u041c\u0438\u0440!');<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> unicode_assigned ------------------  t<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u0434\u0432\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044e Unicode \u0434\u043b\u044f PostgreSQL \u0438 ICU \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT unicode_version(), icu_unicode_version();<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> unicode_version | icu_unicode_version -----------------+---------------------  15.1            | 14.0<\/code><\/pre>\n<p>  <a name=\"commit_526fe0d7\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4257\/\">\u041d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f xmltext<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/526fe0d7\">526fe0d7<\/a><\/p>\n<p>  <\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f xmltext \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 SQL. \u041e\u043d\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 XML, \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT xmltext('&lt;\u041f\u0440\u0438\u0432\u0435\u0442 &amp; \u041c\u0438\u0440>');<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">         xmltext           --------------------------  &amp;lt;\u041f\u0440\u0438\u0432\u0435\u0442 &amp;amp; \u041c\u0438\u0440&amp;gt;<\/code><\/pre>\n<p>  <a name=\"commit_97957fdb\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4343\/\">\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 AT LOCAL<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/97957fdb\">97957fdb<\/a><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f AT TIME ZONE \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 SQL \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 AT LOCAL \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <em>timezone<\/em>). \u0422\u0435\u043f\u0435\u0440\u044c AT LOCAL \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 PostgreSQL. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u0434\u043b\u044f \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430 &#8216;Europe\/Moscow&#8217;:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT  now() AT TIME ZONE 'Europe\/Moscow',         now() AT LOCAL \\gx<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-[ RECORD 1 ]------------------------ timezone | 2023-12-18 12:57:29.612578 timezone | 2023-12-18 12:57:29.612578<\/code><\/pre>\n<p>  <a name=\"commit_519fc1bd\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4127\/\">\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/519fc1bd\">519fc1bd<\/a><\/p>\n<p>  <\/p>\n<p>\u0422\u0438\u043f interval \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT 'infinity'::interval, '-infinity'::interval;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> interval | interval   ----------+-----------  infinity | -infinity<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">SELECT now() + 'infinity'::interval,        now() - 'infinity'::interval;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> ?column? | ?column?   ----------+-----------  infinity | -infinity<\/code><\/pre>\n<p>  <a name=\"commit_2d870b4a\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4614\/\">ALTER SYSTEM \u0441 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/2d870b4a\">2d870b4a<\/a><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 ALTER SYSTEM \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 postgresql.auto.conf \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"pgsql\">=# ALTER SYSTEM SET myapp.today = '2023-12-06'; ALTER SYSTEM<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043d\u043e \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>GRANT .. ON PARAMETER<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e ALTER SYSTEM \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 \u0441\u0435\u0430\u043d\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 SET \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0421\u0442\u043e\u043b\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u0447\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b postgresql.conf.<\/p>\n<p>  <a name=\"commit_721856ff\"><\/a>  <\/p>\n<p><strong><a href=\"https:\/\/commitfest.postgresql.org\/45\/4357\/\">\u0421\u0431\u043e\u0440\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432<\/a><\/strong><br \/>  commit: <a href=\"https:\/\/github.com\/postgres\/postgres\/commit\/721856ff\">721856ff<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 tar-\u0430\u0440\u0445\u0438\u0432\u0430\u0445 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 Flex, Bison, perl. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 man. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 <a href=\"https:\/\/www.postgresql.org\/ftp\/source\/\">Downloads<\/a>, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f flex, bison \u0438 perl.<\/p>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b meson, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0437 tar-\u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u0432 \u043d\u044b\u043d\u0435\u0448\u043d\u0435\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0432\u0441\u0451. \u0416\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e, \u044f\u043d\u0432\u0430\u0440\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\/782042\/\"> https:\/\/habr.com\/ru\/articles\/782042\/<\/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\/rs\/kg\/fj\/rskgfj3h-q7cnbocukddxy4aqog.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/rs\/kg\/fj\/rskgfj3h-q7cnbocukddxy4aqog.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u043e\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442 \u043f\u0440\u0438\u043d\u0435\u0441 \u043d\u0435\u043c\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e! \u0411\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0439 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443.<\/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 \u0438 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0444\u0435\u0441\u0442\u0430\u0445 \u2015 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0441\u0435\u0440\u0438\u0438: <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/757028\/\">2023-07<\/a>, <a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/769598\/\">2023-09<\/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-363524","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/363524","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=363524"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/363524\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=363524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=363524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=363524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}