{"id":474521,"date":"2025-09-10T15:02:10","date_gmt":"2025-09-10T15:02:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=474521"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=474521","title":{"rendered":"<span>\u041e \u00ab\u0437\u0430\u043b\u0438\u043f\u0430\u043d\u0438\u0438\u00bb \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 checkpoint \u0438 archive_timeout \u0432 Postgres<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u043a\u043e\u043b\u043b\u0435\u0433\u0438!<\/p>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0421\u0423\u0411\u0414 PostgresPro \u043f\u043e\u0434 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439: \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0447\u0430\u0441\u043e\u0432,\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043e\u043a\u043e\u043b\u043e 20 \u0422\u0411, \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u2014 75.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u0435: \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 checkpointer \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0411\u0414 \u043b\u0438\u0431\u043e \u0441\u0440\u0430\u0437\u0443, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 2-3 \u0447\u0430\u0441\u0430.<br \/>NB. <em>checkpointer\u00a0\u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438\u00bb, \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432\u00a0\u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u00ab\u0433\u0440\u044f\u0437\u043d\u044b\u0445\u00bb \u0434\u0430\u0442\u0430\u2011\u0431\u043b\u043e\u043a\u043e\u0432 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0430\u00a0\u0442\u0430\u043a\u00a0\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0\u0440\u0435\u0436\u0438\u043c\u0435 archive_mode off \u043e\u043d \u00ab\u043f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u0442\u00bb \u0443\u0436\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 WAL \u0436\u0443\u0440\u043d\u0430\u043b\u044b.<\/em><br \/><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445 pgPro, \u0441\u043c. <\/em><a href=\"https:\/\/edu.postgrespro.ru\/16\/dba2-16\/dba2%5C_10%5C_wal%5C_checkpoint.html\" rel=\"noopener noreferrer nofollow\"><em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em><\/a><em> , \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0430\u0439\u0434 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a.<\/em><\/p>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 checkpointer&#8217;a \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <\/p>\n<pre><code class=\"sql\">select checkpoints_req , checkpoints_timed from pg_catalog.pg_stat_bgwriter;<\/code><\/pre>\n<p>\u0433\u0434\u0435:<br \/>checkpoints_timed \u2014 <em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e (\u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 checkpoint_timeout).<\/em><br \/>checkpoints_req \u2014 <em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 &#171;\u0441\u0433\u0435\u043d\u0435\u0440\u0451\u043d\u043d\u044b\u0445&#187; WAL (\u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 max_wal_size).<\/em><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 2-3 \u0447\u0430\u0441\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434 WAL, \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#171;\u0432\u0441\u0442\u0430\u0432\u0430\u043b\u0430&#187;.<\/p>\n<p>\u0411\u044b\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u0435\u043d\u0434\u043e\u0440\u0430, \u0438 \u0432\u044b\u0434\u0430\u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>archive_timeout=0<\/code>. <\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439, \u0442.\u043a. \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e archive_mode=off (\u0442.\u0435. WAL \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u044e\u0442\u0441\u044f).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 perf&#8217;\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 checkpointer&#8217;a <\/p>\n<pre><code>perf record -F 299 -p &lt;PID-checkpoitera&gt; --call-graph=dwarf -a sleep 300<\/code><\/pre>\n<p>\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code>postgres 814802\/814802 2409584.728453: cycles:                  ffffffffac07c5a6 native_write_msr ([kernel.kallsyms])                 ffffffffac010656 __intel_pmu_enable_all.constprop.0 ([kernel.kallsyms])                 ffffffffac24aa90 __perf_event_task_sched_in ([kernel.kallsyms])                 ffffffffac0d6b0a finish_task_switch.isra.0 ([kernel.kallsyms])                 ffffffffacb09eb4 __schedule ([kernel.kallsyms])                 ffffffffacb0adda schedule ([kernel.kallsyms])                 ffffffffac162710 futex_wait_queue ([kernel.kallsyms])                 ffffffffac162d73 futex_wait ([kernel.kallsyms])                 ffffffffac15f876 do_futex ([kernel.kallsyms])                 ffffffffac15fd11 __x64_sys_futex ([kernel.kallsyms])                 ffffffffacafc154 do_syscall_64 ([kernel.kallsyms])                 ffffffffacc00126 entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])                            11994 futex_abstimed_wait_cancelable (inlined)                            11994 do_futex_wait (inlined)                            11a97 __new_sem_wait_slow (inlined)                           438031 PGSemaphoreLock (\/opt\/pgpro\/ent-16\/bin\/postgres)                           4cb3db LWLockAcquire (\/opt\/pgpro\/ent-16\/bin\/postgres)                           203ef1 GetLastSegSwitchData (\/opt\/pgpro\/ent-16\/bin\/postgres) &lt;-------                           43dd47 CheckArchiveTimeout (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43e301 CheckpointerMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43c551 AuxiliaryProcessMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443921 StartChildProcess (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443989 StartupSequence (\/opt\/pgpro\/ent-16\/bin\/postgres)                           448915 PostmasterMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           16525d main (\/opt\/pgpro\/ent-16\/bin\/postgres)                            27efc __libc_start_main (\/lib64\/libc-2.32.so)                           1658b9 _start (\/opt\/pgpro\/ent-16\/bin\/postgres)  postgres 814802\/814802 2409584.728458: cycles:                  ffffffffac07c5a6 native_write_msr ([kernel.kallsyms])                 ffffffffac010656 __intel_pmu_enable_all.constprop.0 ([kernel.kallsyms])                 ffffffffac24aa90 __perf_event_task_sched_in ([kernel.kallsyms])                 ffffffffac0d6b0a finish_task_switch.isra.0 ([kernel.kallsyms])                 ffffffffacb09eb4 __schedule ([kernel.kallsyms])                 ffffffffacb0adda schedule ([kernel.kallsyms])                 ffffffffac162710 futex_wait_queue ([kernel.kallsyms])                 ffffffffac162d73 futex_wait ([kernel.kallsyms])                 ffffffffac15f876 do_futex ([kernel.kallsyms])                 ffffffffac15fd11 __x64_sys_futex ([kernel.kallsyms])                 ffffffffacafc154 do_syscall_64 ([kernel.kallsyms])                 ffffffffacc00126 entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])                            11994 futex_abstimed_wait_cancelable (inlined)                            11994 do_futex_wait (inlined)                            11a97 __new_sem_wait_slow (inlined)                           438031 PGSemaphoreLock (\/opt\/pgpro\/ent-16\/bin\/postgres)                           4cb3db LWLockAcquire (\/opt\/pgpro\/ent-16\/bin\/postgres)                           203ef1 GetLastSegSwitchData (\/opt\/pgpro\/ent-16\/bin\/postgres) &lt;------                           43dd47 CheckArchiveTimeout (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43e301 CheckpointerMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43c551 AuxiliaryProcessMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443921 StartChildProcess (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443989 StartupSequence (\/opt\/pgpro\/ent-16\/bin\/postgres)                           448915 PostmasterMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           16525d main (\/opt\/pgpro\/ent-16\/bin\/postgres)                            27efc __libc_start_main (\/lib64\/libc-2.32.so)                           1658b9 _start (\/opt\/pgpro\/ent-16\/bin\/postgres) <\/code><\/pre>\n<p>\u0438 \u0435\u0449\u0451 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u044d\u043a-\u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430.<\/p>\n<p>\u0422.\u0435. \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c LW \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 <code>CheckArchiveTimeout -&gt; GetLastSegSwitchData -&gt; LWLockAcquire<\/code> \u0438 \u0431\u0435\u0437\u043d\u0430\u0434\u0451\u0436\u043d\u043e (\u0432\u0438\u0434\u0438\u043c\u043e, \u0438\u0437-\u0437\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 WAL) \u0436\u0434\u0451\u043c \u0435\u0451.<\/p>\n<p>\u0415c\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Postgres, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e (\u0441\u043c. <a href=\"https:\/\/github.com\/postgres\/postgres\/blob\/REL_16_STABLE\/src\/backend\/postmaster\/checkpointer.c#L611\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a>)<\/p>\n<pre><code class=\"cpp\">static void CheckArchiveTimeout(void) {                 pg_time_t          now;                 pg_time_t          last_time;                 XLogRecPtr         last_switch_lsn;                  if (XLogArchiveTimeout &lt;= 0 || RecoveryInProgress()) --\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 archive_timeout                                return;                  now = (pg_time_t) time(NULL);                  \/* First we do a quick check using possibly-stale local state. *\/                 if ((int) (now - last_xlog_switch_time) &lt; XLogArchiveTimeout)                                return;                  \/*                 * Update local state ... note that last_xlog_switch_time is the last time                 * a switch was performed *or requested*.                 *\/                 last_time = GetLastSegSwitchData(&amp;last_switch_lsn); -- \u041f\u0420\u041e\u0411\u041b\u0415\u041c\u041d\u0410\u042f \u0411\u041b\u041e\u041a\u0418\u0420\u041e\u0412\u041a\u0410                  last_xlog_switch_time = Max(last_xlog_switch_time, last_time); <\/code><\/pre>\n<p>\u043f\u0440\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>archive_timeout<\/code> \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>&lt;=0<\/code>, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>archive_timeout=0<\/code> \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0448\u043b\u0430.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e:<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>archive_timeout<\/code> \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 WAL<\/p>\n<\/li>\n<li>\n<p>Checkpointer \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 &#171;\u0437\u0430\u043b\u0438\u043f\u0430\u0442\u044c&#187; \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 (\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439) \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430  <code>archive_timeout<\/code> \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 WAL.<\/p>\n<\/li>\n<\/ol>\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\/945742\/\"> https:\/\/habr.com\/ru\/articles\/945742\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u043a\u043e\u043b\u043b\u0435\u0433\u0438!<\/p>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0421\u0423\u0411\u0414 PostgresPro \u043f\u043e\u0434 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439: \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0447\u0430\u0441\u043e\u0432,\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043e\u043a\u043e\u043b\u043e 20 \u0422\u0411, \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u2014 75.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u0435: \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 checkpointer \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0411\u0414 \u043b\u0438\u0431\u043e \u0441\u0440\u0430\u0437\u0443, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 2-3 \u0447\u0430\u0441\u0430.<br \/>NB. <em>checkpointer\u00a0\u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438\u00bb, \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432\u00a0\u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u00ab\u0433\u0440\u044f\u0437\u043d\u044b\u0445\u00bb \u0434\u0430\u0442\u0430\u2011\u0431\u043b\u043e\u043a\u043e\u0432 \u043d\u0430\u00a0\u0434\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0430\u00a0\u0442\u0430\u043a\u00a0\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0\u0440\u0435\u0436\u0438\u043c\u0435 archive_mode off \u043e\u043d \u00ab\u043f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u0442\u00bb \u0443\u0436\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 WAL \u0436\u0443\u0440\u043d\u0430\u043b\u044b.<\/em><br \/><em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445 pgPro, \u0441\u043c. <\/em><a href=\"https:\/\/edu.postgrespro.ru\/16\/dba2-16\/dba2%5C_10%5C_wal%5C_checkpoint.html\" rel=\"noopener noreferrer nofollow\"><em>\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/em><\/a><em> , \u0432 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0430\u0439\u0434 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a.<\/em><\/p>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 checkpointer&#8217;a \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <\/p>\n<pre><code class=\"sql\">select checkpoints_req , checkpoints_timed from pg_catalog.pg_stat_bgwriter;<\/code><\/pre>\n<p>\u0433\u0434\u0435:<br \/>checkpoints_timed \u2014 <em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e (\u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 checkpoint_timeout).<\/em><br \/>checkpoints_req \u2014 <em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 &#171;\u0441\u0433\u0435\u043d\u0435\u0440\u0451\u043d\u043d\u044b\u0445&#187; WAL (\u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 max_wal_size).<\/em><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 2-3 \u0447\u0430\u0441\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434 WAL, \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#171;\u0432\u0441\u0442\u0430\u0432\u0430\u043b\u0430&#187;.<\/p>\n<p>\u0411\u044b\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u0435\u043d\u0434\u043e\u0440\u0430, \u0438 \u0432\u044b\u0434\u0430\u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>archive_timeout=0<\/code>. <\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439, \u0442.\u043a. \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e archive_mode=off (\u0442.\u0435. WAL \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u044e\u0442\u0441\u044f).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 perf&#8217;\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 checkpointer&#8217;a <\/p>\n<pre><code>perf record -F 299 -p &lt;PID-checkpoitera&gt; --call-graph=dwarf -a sleep 300<\/code><\/pre>\n<p>\u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code>postgres 814802\/814802 2409584.728453: cycles:                  ffffffffac07c5a6 native_write_msr ([kernel.kallsyms])                 ffffffffac010656 __intel_pmu_enable_all.constprop.0 ([kernel.kallsyms])                 ffffffffac24aa90 __perf_event_task_sched_in ([kernel.kallsyms])                 ffffffffac0d6b0a finish_task_switch.isra.0 ([kernel.kallsyms])                 ffffffffacb09eb4 __schedule ([kernel.kallsyms])                 ffffffffacb0adda schedule ([kernel.kallsyms])                 ffffffffac162710 futex_wait_queue ([kernel.kallsyms])                 ffffffffac162d73 futex_wait ([kernel.kallsyms])                 ffffffffac15f876 do_futex ([kernel.kallsyms])                 ffffffffac15fd11 __x64_sys_futex ([kernel.kallsyms])                 ffffffffacafc154 do_syscall_64 ([kernel.kallsyms])                 ffffffffacc00126 entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])                            11994 futex_abstimed_wait_cancelable (inlined)                            11994 do_futex_wait (inlined)                            11a97 __new_sem_wait_slow (inlined)                           438031 PGSemaphoreLock (\/opt\/pgpro\/ent-16\/bin\/postgres)                           4cb3db LWLockAcquire (\/opt\/pgpro\/ent-16\/bin\/postgres)                           203ef1 GetLastSegSwitchData (\/opt\/pgpro\/ent-16\/bin\/postgres) &lt;-------                           43dd47 CheckArchiveTimeout (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43e301 CheckpointerMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43c551 AuxiliaryProcessMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443921 StartChildProcess (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443989 StartupSequence (\/opt\/pgpro\/ent-16\/bin\/postgres)                           448915 PostmasterMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           16525d main (\/opt\/pgpro\/ent-16\/bin\/postgres)                            27efc __libc_start_main (\/lib64\/libc-2.32.so)                           1658b9 _start (\/opt\/pgpro\/ent-16\/bin\/postgres)  postgres 814802\/814802 2409584.728458: cycles:                  ffffffffac07c5a6 native_write_msr ([kernel.kallsyms])                 ffffffffac010656 __intel_pmu_enable_all.constprop.0 ([kernel.kallsyms])                 ffffffffac24aa90 __perf_event_task_sched_in ([kernel.kallsyms])                 ffffffffac0d6b0a finish_task_switch.isra.0 ([kernel.kallsyms])                 ffffffffacb09eb4 __schedule ([kernel.kallsyms])                 ffffffffacb0adda schedule ([kernel.kallsyms])                 ffffffffac162710 futex_wait_queue ([kernel.kallsyms])                 ffffffffac162d73 futex_wait ([kernel.kallsyms])                 ffffffffac15f876 do_futex ([kernel.kallsyms])                 ffffffffac15fd11 __x64_sys_futex ([kernel.kallsyms])                 ffffffffacafc154 do_syscall_64 ([kernel.kallsyms])                 ffffffffacc00126 entry_SYSCALL_64_after_hwframe ([kernel.kallsyms])                            11994 futex_abstimed_wait_cancelable (inlined)                            11994 do_futex_wait (inlined)                            11a97 __new_sem_wait_slow (inlined)                           438031 PGSemaphoreLock (\/opt\/pgpro\/ent-16\/bin\/postgres)                           4cb3db LWLockAcquire (\/opt\/pgpro\/ent-16\/bin\/postgres)                           203ef1 GetLastSegSwitchData (\/opt\/pgpro\/ent-16\/bin\/postgres) &lt;------                           43dd47 CheckArchiveTimeout (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43e301 CheckpointerMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           43c551 AuxiliaryProcessMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443921 StartChildProcess (\/opt\/pgpro\/ent-16\/bin\/postgres)                           443989 StartupSequence (\/opt\/pgpro\/ent-16\/bin\/postgres)                           448915 PostmasterMain (\/opt\/pgpro\/ent-16\/bin\/postgres)                           16525d main (\/opt\/pgpro\/ent-16\/bin\/postgres)                            27efc __libc_start_main (\/lib64\/libc-2.32.so)                           1658b9 _start (\/opt\/pgpro\/ent-16\/bin\/postgres) <\/code><\/pre>\n<p>\u0438 \u0435\u0449\u0451 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u044d\u043a-\u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430.<\/p>\n<p>\u0422.\u0435. \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c LW \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 <code>CheckArchiveTimeout -&gt; GetLastSegSwitchData -&gt; LWLockAcquire<\/code> \u0438 \u0431\u0435\u0437\u043d\u0430\u0434\u0451\u0436\u043d\u043e (\u0432\u0438\u0434\u0438\u043c\u043e, \u0438\u0437-\u0437\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 WAL) \u0436\u0434\u0451\u043c \u0435\u0451.<\/p>\n<p>\u0415c\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Postgres, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e (\u0441\u043c. <a href=\"https:\/\/github.com\/postgres\/postgres\/blob\/REL_16_STABLE\/src\/backend\/postmaster\/checkpointer.c#L611\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a>)<\/p>\n<pre><code class=\"cpp\">static void CheckArchiveTimeout(void) {                 pg_time_t          now;                 pg_time_t          last_time;                 XLogRecPtr         last_switch_lsn;                  if (XLogArchiveTimeout &lt;= 0 || RecoveryInProgress()) --\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 archive_timeout                                return;                  now = (pg_time_t) time(NULL);                  \/* First we do a quick check using possibly-stale local state. *\/                 if ((int) (now - last_xlog_switch_time) &lt; XLogArchiveTimeout)                                return;                  \/*                 * Update local state ... note that last_xlog_switch_time is the last time                 * a switch was performed *or requested*.                 *\/                 last_time = GetLastSegSwitchData(&amp;last_switch_lsn); -- \u041f\u0420\u041e\u0411\u041b\u0415\u041c\u041d\u0410\u042f \u0411\u041b\u041e\u041a\u0418\u0420\u041e\u0412\u041a\u0410                  last_xlog_switch_time = Max(last_xlog_switch_time, last_time); <\/code><\/pre>\n<p>\u043f\u0440\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>archive_timeout<\/code> \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>&lt;=0<\/code>, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>archive_timeout=0<\/code> \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0448\u043b\u0430.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e:<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>archive_timeout<\/code> \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 WAL<\/p>\n<\/li>\n<li>\n<p>Checkpointer \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 &#171;\u0437\u0430\u043b\u0438\u043f\u0430\u0442\u044c&#187; \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 (\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439) \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430  <code>archive_timeout<\/code> \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443 WAL.<\/p>\n<\/li>\n<\/ol>\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\/945742\/\"> https:\/\/habr.com\/ru\/articles\/945742\/<\/a><br \/><\/br><\/br><\/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-474521","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474521","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=474521"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474521\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}