{"id":270,"date":"2023-08-22T11:56:08","date_gmt":"2023-08-22T08:56:08","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=270"},"modified":"2024-02-05T14:41:31","modified_gmt":"2024-02-05T11:41:31","slug":"zhurnaly-wal-v-pg","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/","title":{"rendered":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL"},"content":{"rendered":"\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u043d\u0438 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a. \u0410 \u0432\u0435\u0434\u044c \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043f\u0440\u0438\u0447\u0438\u043d \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u0410 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f &#8212; Durability \u0432 ACI<strong>D<\/strong>.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0436\u0443\u0440\u043d\u0430\u043b (<strong>WAL &#8212; write ahead log<\/strong>):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0436\u0443\u0440\u043d\u0430\u043b<\/li>\n\n\n\n<li>\u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n\n\n\n<li>\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f &#8212; \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/li>\n<\/ul>\n\n\n\n<p>\u0427\u0442\u043e \u0442\u0443\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u0431\u0443\u0444\u0435\u0440\u043d\u043e\u043c \u043a\u044d\u0448\u0435<\/li>\n\n\n\n<li>\u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u043d\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 (\u043f\u0440\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 <a href=\"https:\/\/aristov.tech\/blog\/tranzakczii-v-postgresql\/\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"https:\/\/aristov.tech\/blog\/tranzakczii-i-mvcc\/\">\u0437\u0434\u0435\u0441\u044c<\/a>) &#8212; \u0431\u0443\u0444\u0435\u0440\u044b XACT<\/li>\n<\/ul>\n\n\n\n<p><strong>\u041d\u0415 \u041f\u041e\u041f\u0410\u0414\u0410\u042e\u0422<\/strong> &#8212; \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043d\u0435\u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n\n\n\n<p>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"331\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png\" alt=\"\" class=\"wp-image-272\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-300x97.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-768x248.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2.png 1137w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c (\u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435) &#8212; \u043d\u0430 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0436\u0443\u0440\u043d\u0430\u043b \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a \u043d\u0435 \u0432 \u0442\u0443 \u0436\u0435 \u0434\u043e\u043b\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u044b &#8212; \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"118\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/2-1-1024x118.png\" alt=\"\" class=\"wp-image-273\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/2-1-1024x118.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/2-1-300x35.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/2-1-768x88.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/2-1.png 1163w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0439\u0442\u0438 \u0434\u043e \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0447\u0435\u0440\u0435\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u044d\u0448\u0438 &#8212; \u0421\u0423\u0411\u0414 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 <strong>wal_sync_method<\/strong>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b.<\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n\n\n\n<p><strong><em>SHOW fsync;<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>SHOW wal_sync_method;<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"412\" height=\"269\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/3-1.png\" alt=\"\" class=\"wp-image-274\" style=\"width:301px;height:197px\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/3-1.png 412w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/3-1-300x196.png 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/figure>\n\n\n\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u0435\u043c \u0432 <strong>postgresql.conf<\/strong>.<\/p>\n\n\n\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u0430 <strong>pg_test_fsync <\/strong>\u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.<\/p>\n\n\n\n<p>\u041f\u0438\u0448\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440 \u0438 \u0432 WAL-\u0431\u0443\u0444\u0435\u0440. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0434\u0451\u0442 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0444\u0430\u0439\u043b \u043b\u043e\u0433\u043e\u0432, \u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u043b\u043e\u0433\u043e\u0432.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0431\u0443\u0444\u0435\u0440 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c:<\/p>\n\n\n\n<p><strong><em>SELECT pg_current_wal_insert_lsn();<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"129\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/4.png\" alt=\"\" class=\"wp-image-275\" style=\"width:382px;height:86px\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/4.png 570w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/4-300x68.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/5-1-1024x512.png\" alt=\"\" class=\"wp-image-276\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/5-1-1024x512.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/5-1-300x150.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/5-1-768x384.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/5-1.png 1118w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>XACT &#8212; \u043c\u0443\u043b\u044c\u0442\u0438\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0442\u043e\u0436\u0435 \u043f\u0438\u0448\u0443\u0442 \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440.<\/p>\n\n\n\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a.<\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 WAL-\u0431\u0443\u0444\u0435\u0440\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0443\u0436\u0435 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"507\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/6-1-1024x507.png\" alt=\"\" class=\"wp-image-277\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/6-1-1024x507.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/6-1-300x149.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/6-1-768x381.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/6-1.png 1132w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f (\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432 <strong>pg_control<\/strong> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u00abshut down\u00bb) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u044d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c<\/li>\n\n\n\n<li>\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c, \u0435\u0441\u043b\u0438 \u0435\u0451 LSN \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c LSN \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/li>\n\n\n\n<li>\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b init-\u0444\u0430\u0439\u043b\u0430\u043c\u0438<\/li>\n<\/ul>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n\n\n\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u0411\u0414 buffer_temp:<\/p>\n\n\n\n<p><strong><em>\\c buffer_temp<\/em><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 WAL-\u0444\u0430\u0439\u043b\u044b:<\/p>\n\n\n\n<p><strong><em>SELECT * FROM pg_ls_waldir() LIMIT 10;<\/em><\/strong><\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446:<\/p>\n\n\n\n<p><strong><em>CREATE EXTENSION pageinspect;<\/em><\/strong><\/p>\n\n\n\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e:<\/p>\n\n\n\n<p><strong><em>BEGIN;<\/em><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044f LSN:<\/p>\n\n\n\n<p><strong><em>SELECT pg_current_wal_insert_lsn();<\/em><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u043e\u0439 \u0443 \u043d\u0430\u0441 WAL file:<\/p>\n\n\n\n<p><strong><em>SELECT pg_walfile_name(&#8216;0\/182BCA8&#8217;);<\/em><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 LSN \u0432 0 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>test_text <\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u044b\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>get_raw_page<\/strong>:<\/p>\n\n\n\n<p><strong><em>SELECT lsn FROM page_header(get_raw_page(&#8216;test_text&#8217;,0));<\/em><\/strong><\/p>\n\n\n\n<p>\u0417\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e:<\/p>\n\n\n\n<p><strong><em>COMMIT;<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"883\" height=\"727\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/7-1.png\" alt=\"\" class=\"wp-image-278\" style=\"width:581px;height:478px\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/7-1.png 883w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/7-1-300x247.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/7-1-768x632.png 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/figure>\n\n\n\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n\n\n<p><strong><em>UPDATE test_text set t = &#8216;1&#8217; WHERE t = &#8216;<\/em><\/strong><strong><em>\u0441\u0442\u0440\u043e\u043a\u0430<\/em><\/strong><strong><em> 1&#8242;;<\/em><\/strong><\/p>\n\n\n\n<p>\u0423\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 LSN \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f &#8212; \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f (<a href=\"https:\/\/aristov.tech\/blog\/urovni-izolyaczii-tranzakczij\/\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445<\/a>) :<\/p>\n\n\n\n<p><strong><em>SELECT pg_current_wal_insert_lsn();<\/em><\/strong><\/p>\n\n\n\n<p>\u0422\u0430\u043a \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f LSN \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 0, \u0433\u0434\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n\n\n\n<p><strong><em>SELECT lsn FROM page_header(get_raw_page(&#8216;test_text&#8217;,0));<\/em><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0431\u0430\u0439\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440:<\/p>\n\n\n\n<p><strong><em>SELECT &#8216;0\/182E0D8&#8217;::pg_lsn &#8212; &#8216;0\/17E0E80&#8217;::pg_lsn;<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"472\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/8-1.png\" alt=\"\" class=\"wp-image-279\" style=\"width:577px;height:311px\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/8-1.png 875w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/8-1-300x162.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/8-1-768x414.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/figure>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 WAL-\u0444\u0430\u0439\u043b, \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 LSN:<\/p>\n\n\n\n<p><strong><em>\/usr\/lib\/postgresql\/15\/bin\/pg_waldump -p \/var\/lib\/postgresql\/15\/main\/pg_wal -s 0\/17E0E80 -e 0\/182E0D8 000000010000000000000001<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"260\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/9-1-1024x260.png\" alt=\"\" class=\"wp-image-280\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/9-1-1024x260.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/9-1-300x76.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/9-1-768x195.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/9-1.png 1488w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0417\u0434\u0435\u0441\u044c \u043b\u0438\u0448\u044c \u0445\u0432\u043e\u0441\u0442 &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 300 000 \u0431\u0430\u0439\u0442 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u043f\u0435\u043b\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0444\u0430\u0439\u043b. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0434\u0435\u0441\u044c \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435 SQL-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f.<\/p>\n\n\n\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0412 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a WAL-\u0444\u0430\u0439\u043b\u044b? \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438 \u0431\u0443\u0444\u0435\u0440\u0430\u043c\u0438? \u0418 \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435? \u041c\u043e\u0436\u043d\u043e \u0436\u0435 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043a\u0430\u0442\u0438\u0442\u044c \u0432\u0441\u0435 wal?<\/p>\n\n\n\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0447\u0438\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0431\u0440\u043e\u0441\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u0434\u0438\u0441\u043a:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0437\u0430\u0447\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0451\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435?<\/li>\n\n\n\n<li>\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0439\u043c\u0451\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0441\u0431\u043e\u0439?<\/li>\n\n\n\n<li>\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440\u043d\u043e\u043c \u043a\u044d\u0448\u0435?<\/li>\n<\/ul>\n\n\n\n<p>\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u043d\u0438 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a. \u0410 \u0432\u0435\u0434\u044c \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043f\u0440\u0438\u0447\u0438\u043d \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u0410 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f &#8212; Durability \u0432 ACID. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0436\u0443\u0440\u043d\u0430\u043b (WAL &#8212; write ahead log): \u0427\u0442\u043e \u0442\u0443\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[84,85,86,16,81,83,87,82,80],"class_list":["post-270","post","type-post","status-publish","format-standard","hentry","category-ustrojstvo-postgresql","tag-pg_control","tag-pg_current_wal_insert_lsn","tag-pg_test_fsync","tag-postgresql","tag-wal","tag-wal_sync_method","tag-wal-bufer","tag-write-ahead-log","tag-zhurnaly"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f<\/title>\n<meta name=\"description\" content=\"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"og:description\" content=\"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-22T08:56:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-05T11:41:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png\" \/>\n<meta name=\"author\" content=\"aeuge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"aeuge\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/\"},\"author\":{\"name\":\"aeuge\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/191712eae0472c7752fc806134be751d\"},\"headline\":\"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL\",\"datePublished\":\"2023-08-22T08:56:08+00:00\",\"dateModified\":\"2024-02-05T11:41:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/\"},\"wordCount\":610,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/1-2-1024x331.png\",\"keywords\":[\"pg_control\",\"pg_current_wal_insert_lsn\",\"pg_test_fsync\",\"postgresql\",\"wal\",\"wal_sync_method\",\"WAL-\u0431\u0443\u0444\u0435\u0440\",\"write ahead log\",\"\u0436\u0443\u0440\u043d\u0430\u043b\u044b\"],\"articleSection\":[\"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/\",\"name\":\"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/1-2-1024x331.png\",\"datePublished\":\"2023-08-22T08:56:08+00:00\",\"dateModified\":\"2024-02-05T11:41:31+00:00\",\"description\":\"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/1-2.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/1-2.png\",\"width\":1137,\"height\":367},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/zhurnaly-wal-v-pg\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\",\"name\":\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\",\"name\":\"admin2\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"width\":180,\"height\":180,\"caption\":\"admin2\"},\"logo\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\"},\"sameAs\":[\"https:\\\/\\\/aristov.tech\\\/blog\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/191712eae0472c7752fc806134be751d\",\"name\":\"aeuge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"caption\":\"aeuge\"},\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/author\\\/aeuge\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/","og_locale":"ru_RU","og_type":"article","og_title":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","og_description":"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.","og_url":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/","og_site_name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","article_published_time":"2023-08-22T08:56:08+00:00","article_modified_time":"2024-02-05T11:41:31+00:00","og_image":[{"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png","type":"","width":"","height":""}],"author":"aeuge","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"aeuge","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"5 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/"},"author":{"name":"aeuge","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/191712eae0472c7752fc806134be751d"},"headline":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL","datePublished":"2023-08-22T08:56:08+00:00","dateModified":"2024-02-05T11:41:31+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/"},"wordCount":610,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png","keywords":["pg_control","pg_current_wal_insert_lsn","pg_test_fsync","postgresql","wal","wal_sync_method","WAL-\u0431\u0443\u0444\u0435\u0440","write ahead log","\u0436\u0443\u0440\u043d\u0430\u043b\u044b"],"articleSection":["\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/","url":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/","name":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2-1024x331.png","datePublished":"2023-08-22T08:56:08+00:00","dateModified":"2024-02-05T11:41:31+00:00","description":"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WAL (write ahead log) \u0432 PostgreSQL \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u044f.","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/08\/1-2.png","width":1137,"height":367},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/zhurnaly-wal-v-pg\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/aristov.tech\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0416\u0443\u0440\u043d\u0430\u043b\u044b (WAL) \u0432 PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/aristov.tech\/blog\/#website","url":"https:\/\/aristov.tech\/blog\/","name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"","publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aristov.tech\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":["Person","Organization"],"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7","name":"admin2","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","width":180,"height":180,"caption":"admin2"},"logo":{"@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png"},"sameAs":["https:\/\/aristov.tech\/blog"]},{"@type":"Person","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/191712eae0472c7752fc806134be751d","name":"aeuge","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","caption":"aeuge"},"url":"https:\/\/aristov.tech\/blog\/author\/aeuge\/"}]}},"_links":{"self":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/comments?post=270"}],"version-history":[{"count":3,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/270\/revisions"}],"predecessor-version":[{"id":430,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/270\/revisions\/430"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}