{"id":42183,"date":"2023-08-28T14:53:42","date_gmt":"2023-07-03T20:31:13","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/"},"modified":"2024-04-30T20:27:45","modified_gmt":"2024-04-30T12:27:45","slug":"postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/","title":{"rendered":"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u55b5~\u3002<br \/>\n\u5c31\u50cf\u5e73\u5e38\u4e00\u6837\uff0c\u73b0\u5728\u662f\u8fdb\u884c PostgreSQL \u65b0\u7248\u672c\u5dee\u5f02\u9884\u8c03\u7814\u7684\u65f6\u671f\u4e86\u3002<br \/>\n\u6240\u4ee5\uff0c\u8fd9\u6b21\u6211\u4eec\u6765\u7814\u7a76\u4e00\u4e0b PostgreSQL 14 \u548c PostgreSQL 15 \u7684\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u3002<\/p>\n<h1>\u8c03\u67e5\u65b9\u6cd5\u7684\u63cf\u8ff0<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">PostgreSQL 14\/PostgreSQL 15 beta1\u3092\u4f7f\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u5b9f\u884c\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>initdb\uff08-D\u30aa\u30d7\u30b7\u30e7\u30f3\u3068-U postgres\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u6307\u5b9a\uff09\u3092\u5b9f\u884c\u3002<br \/>\n\u751f\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u3092\u8d77\u52d5\u3002<br \/>\npostgres\u30e6\u30fc\u30b6\u3067postgres\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\u3002<br \/>\npsql\u306e\\a\u30e1\u30bf\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3002<br \/>\npsql\u306e\\o\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3002<\/p>\n<p>SELECT name, setting, unit, category, context, vartype, min_val, max_val, enumvals FROM pg_settings ORDER BY name;\u3092\u5b9f\u884c\u30021<\/p>\n<p>\u751f\u6210\u3055\u308c\u305fPostgreSQL 14\u306e\u7d50\u679c\u3068PostgreSQL 15-beta1\u306e\u7d50\u679c\u3092diff\u308b\u3002<\/p>\n<h1>\u8c03\u67e5\u7ed3\u679c ch\u00e1 ji\u00e9 gu\u01d2)<\/h1>\n<h2>\u8bf7\u63d0\u4f9b\u66f4\u591a\u4e0a\u4e0b\u6587\u3002&#8221;\u884c\u6570&#8221;\u5728\u8fd9\u91cc\u662f\u4e00\u4e2a\u5f88\u62bd\u8c61\u7684\u8bcd\u6c47\uff0c\u5b83\u53ef\u4ee5\u6709\u4e0d\u540c\u7684\u610f\u601d\uff0c\u56e0\u6b64\u9700\u8981\u4e86\u89e3\u5177\u4f53\u7684\u80cc\u666f\u4ee5\u4fbf\u7528\u4e2d\u6587\u51c6\u786e\u5730\u8fdb\u884c\u8868\u8fbe\u3002<\/h2>\n<p>\u9009\u62e9\u8bed\u53e5\u4e2d\u7684\u884c\u6570<\/p>\n<div>\n<div class=\"post-table\">versionrowsPostgreSQL 14344PostgreSQL 15 beta1353<\/div>\n<\/div>\n<h2>\u5206\u6790\u5668<\/h2>\n<p>\u4ee5\u4e0b\u662fPostgreSQL 14.3\u548cPostgreSQL 15 beta1\u4e4b\u95f4\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u6458\u8981\u3002<br \/>\n\u8fd8\u6709\u76f8\u5f53\u591a\u7684\u65b0\u589e\u53c2\u6570\u3002<\/p>\n<div>\n<div class=\"post-table\">\u30d1\u30e9\u30e1\u30fc\u30bf\u540d\u5dee\u5206\u7a2e\u5225\u5dee\u5206\u6982\u8981allow_in_place_tablespaces\u8ffd\u52a0\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092pg_tblspc\u5185\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3057\u3066\u4f5c\u6210\u3092\u8a31\u5bb9\u304b\u3069\u3046\u304barchive_library\u8ffd\u52a0\u30a2\u30fc\u30ab\u30a4\u30d6\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6307\u5b9a\u3059\u308bcompute_query_id\u5909\u66f4\u5024\u57df\u306bregress\u304c\u8ffd\u52a0enable_group_by_reordering\u8ffd\u52a0GROUP BY\u53e5\u306e\u30ad\u30fc\u306e\u4e26\u3079\u66ff\u3048\u3092\u6709\u52b9\u307e\u305f\u306f\u7121\u52b9\u306b\u3059\u308bhash_mem_multiplier\u5909\u66f4\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c1.0\u304b\u30892.0\u306b\u5909\u66f4log_autovacuum_min_duration\u5909\u66f4\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c-1\u304b\u308960000\u306b\u5909\u66f4log_destination\u5909\u66f4\u5024\u57df\u306bjsonlog\u304c\u8ffd\u52a0log_checkpoints\u5909\u66f4\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304coff\u304b\u3089on\u306b\u5909\u66f4log_startup_progress_interval\u8ffd\u52a0startup process\u4e2d\u306b\u9577\u6642\u9593\u304b\u304b\u3063\u305f\u51e6\u7406\u3092\u30ed\u30ae\u30f3\u30b0\u3059\u308b\u9593\u9694\u3092\u8a2d\u5b9arecovery_prefetch\u8ffd\u52a0\u30ea\u30ab\u30d0\u30ea\u6642\u306b\u30d6\u30ed\u30c3\u30af\u306e\u30d7\u30ea\u30d5\u30a7\u30c3\u30c1\u3092\u8a66\u307f\u308b\u304brecursive_worktable_factor\u8ffd\u52a0\u518d\u5e30\u7684\u306a\u554f\u3044\u5408\u308f\u305b\u306e\u4f5c\u696d\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u306e\u63a8\u5b9a\u5024\u7b97\u51fa\u4fc2\u6570shared_memory_size\u8ffd\u52a0\u4e3b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u5831\u544a\u3057\u3001\u6700\u3082\u8fd1\u3044\u30e1\u30ac\u30d0\u30a4\u30c8\u306b\u5207\u308a\u4e0a\u3052\u308b\uff08\uff1f\uff09shared_memory_size_in_huge_pages\u8ffd\u52a0\u4e3b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u3067\u5fc5\u8981\u3068\u3055\u308c\u308bhuge\u30da\u30fc\u30b8\u306e\u6570\u3092\u5831\u544astats_temp_directory\u524a\u9664<br \/>\nstats_fetch_consistency\u8ffd\u52a0\u7d2f\u7a4d\u7d71\u8a08\u5024\u304c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5185\u3067\u8907\u6570\u56de\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u5834\u5408\u306e\u52d5\u4f5c\u3092\u6c7a\u5b9atrack_activities\u5909\u66f4Category\u306e\u5909\u66f4track_activity_query_size\u5909\u66f4Category\u306e\u5909\u66f4track_counts\u5909\u66f4Category\u306e\u5909\u66f4track_functions\u5909\u66f4Category\u306e\u5909\u66f4track_io_timing\u5909\u66f4Category\u306e\u5909\u66f4track_wal_io_timing\u5909\u66f4Category\u306e\u5909\u66f4wal_compression\u5909\u66f4\u578b\u306e\u5909\u66f4<br \/>\n\u5024\u57df\u306e\u5909\u66f4<br \/>\n\u5727\u7e2e\u65b9\u5f0f\u8ffd\u52a0\u306b\u5bfe\u5fdc\u3057\u305f\u3082\u306e\u3002wal_decode_buffer_size\u8ffd\u52a0WAL\u3092\u30d7\u30ea\u30d5\u30a7\u30c3\u30c1\u3059\u308b\u3068\u304d\u306b\u3069\u3053\u307e\u3067\u898b\u308b\u304b<\/div>\n<\/div>\n<h1>\u65b0\u589e\u7684\u53c2\u6570 de<\/h1>\n<p>PostgreSQL 15\u4e2d\u5f15\u5165\u4e86\u8bb8\u591a\u65b0\u53c2\u6570\u3002<\/p>\n<h2>\u5141\u8bb8\u5c31\u5730\u8868\u7a7a\u95f4<\/h2>\n<p>\u7c7b\u522b\u662f\u201c\u5f00\u53d1\u8005\u9009\u9879\u201d\u3002<br \/>\n\u63a7\u5236\u662f\u5426\u5141\u8bb8\u5c06\u8868\u7a7a\u95f4\u521b\u5efa\u4e3apg_tblspc\u76ee\u5f55\u7684\u53c2\u6570\u3002<br \/>\n\u9ed8\u8ba4\u503c\u4e3a\u5173\u95ed\u3002<br \/>\n\u4ece\u53c2\u6570\u7684\u8bf4\u660e\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u8fd9\u4e2a\u53c2\u6570\u5728\u914d\u7f6e\u4e3b\u670d\u52a1\u5668\u548c\u5907\u4efd\u670d\u52a1\u5668\u4f4d\u4e8e\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u5e76\u8fdb\u884c\u6d4b\u8bd5\u7684\u573a\u666f\u4e2d\u4f7f\u7528\u3002<br \/>\n\u5728\u6b63\u5e38\u8fd0\u8425\u4e2d\uff0c\u6211\u8ba4\u4e3a\u4e0d\u4f1a\u8bbe\u8ba1\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u4e3b\u670d\u52a1\u5668\u548c\u5907\u4efd\u670d\u52a1\u5668\u7684HA\u67b6\u6784\uff0c\u6240\u4ee5\u53ef\u80fd\u4e0d\u4f1a\u7528\u5230\u3002<\/p>\n<p>\u5f53\u624b\u5934\u53ea\u6709\u4e00\u53f0\u8bbe\u5907\u8fdb\u884c\u5173\u4e8e\u590d\u5236\u7684\u5c0f\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u6211\u60f3\u8981\u56de\u5fc6\u8d77\u6765\u7684\u5e94\u8be5\u662f\u4ec0\u4e48\u53c2\u6570\u5462\uff1f<\/p>\n<h2>\u5f52\u6863\u56fe\u4e66\u9986<\/h2>\n<p>\u7c7b\u522b\u662f\u201c\u9884\u5199\u5f0f\u65e5\u5fd7\u201d\u3002<br \/>\n\u5b83\u4f3c\u4e4e\u662f\u7528\u4e8e\u6307\u5b9a\u5f52\u6863\u5e93\uff0c\u4ee5\u66ff\u4ee3archive_command\u3002<br \/>\n\u9ed8\u8ba4\u503c\u662f\u7a7a\u5b57\u7b26\u4e32\u3002<br \/>\n\u5982\u679c\u8bbe\u7f6e\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff0c\u5219\u4ecd\u7136\u4f7f\u7528archive_command\u6765\u8fdb\u884c\u5f52\u6863\u3002<\/p>\n<h2>\u542f\u7528\u5206\u7ec4\u91cd\u6392\u5e8f<\/h2>\n<p>\u8fd9\u4e2a\u7c7b\u522b\u662f\u201c\u67e5\u8be2\u8ba1\u5212\u201d\u3002<br \/>\n\u4e00\u4e2a\u53c2\u6570\u7528\u4e8e\u542f\u7528\u6216\u7981\u7528GROUP BY\u5b50\u53e5\u7684\u952e\u6392\u5e8f\u3002<br \/>\n\u9ed8\u8ba4\u503c\u4e3a\u542f\u7528\u72b6\u6001\u3002<\/p>\n<p>\u8fd9\u4e2a\u53c2\u6570\u4e0e\u53d1\u5e03\u8bf4\u660e\u4e66\u4e2d\u7684\u4ee5\u4e0b\u9879\u76ee\u76f8\u5173\u3002<\/p>\n<blockquote><p>\u5141\u8bb8\u901a\u8fc7GROUP BY\u5bf9\u5217\u987a\u5e8f\u8fdb\u884c\u6392\u5e8f\u4ee5\u4f18\u5316\uff08Dmitry Dolgov\u3001Teodor Sigaev\u3001Tomas Vondra\uff09\u3002<br \/>\n\u53ef\u4ee5\u4f7f\u7528\u670d\u52a1\u5668\u53d8\u91cfenable_group_by_reordering\u6765\u7981\u7528\u6b64\u4f18\u5316\u3002<\/p><\/blockquote>\n<p>\u5fc5\u987b\u8fd0\u884c\u5305\u542bGROUP BY\u6392\u5e8f\u7684\u67e5\u8be2\u624d\u80fd\u786e\u8ba4\u5176\u6548\u679c\uff0c\u5426\u5219\u65e0\u6cd5\u77e5\u6653\u3002<\/p>\n<h2>\u8bb0\u5f55\u542f\u52a8\u8fdb\u7a0b\u95f4\u9694<\/h2>\n<p>\u6240\u8ff0\u7c7b\u522b\u4e3a\u201c\u9519\u8bef\u62a5\u544a\u548c\u65e5\u5fd7\u8bb0\u5f55\u201d\u3002<br \/>\n\u5728PostgreSQL\u7684\u542f\u52a8\u8fc7\u7a0b\u4e2d\uff0c\u597d\u50cf\u53ef\u4ee5\u8bb0\u5f55\u957f\u65f6\u95f4\u7684\u5904\u7406\u8fc7\u7a0b\u3002<br \/>\n\u9ed8\u8ba4\u503c\u4e3a10000\u6beb\u79d2\uff0810\u79d2\uff09\uff0c\u901a\u8fc7\u5c06\u5176\u8bbe\u7f6e\u4e3a-1\u53ef\u4ee5\u7981\u7528\u6b64\u65e5\u5fd7\u8bb0\u5f55\u3002<br \/>\n\u6839\u636e\u53c2\u6570\u8bf4\u660e\uff0c\u8fd9\u662f\u4e00\u4e2a\u8bbe\u7f6e\u95f4\u9694\u7684\u53c2\u6570\uff0c\u4f8b\u5982\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3a10000\uff0c\u5219\u5728\u542f\u52a8\u8fc7\u7a0b\u4e2d\u67d0\u4e9b\u64cd\u4f5c\u8017\u65f625\u79d2\u65f6\uff0c\u5c06\u4f1a\u8bb0\u5f55\u4e24\u6b21\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u8fd0\u884c\u4e2d\uff0c\u542f\u52a8\u8fc7\u7a0b\u9700\u8981\u82b1\u8d3910\u79d2\u949f\u8fd9\u6837\u7684\u60c5\u51b5\u5927\u6982\u6709\u591a\u5c11\u5462&#8230;\uff1f<br \/>\n\u5e76\u975e\u4e3b\u4f53\u529f\u80fd\uff0c\u800c\u662f\u4e0ePostgreSQL\u4e3b\u4f53\u4e00\u8d77\u542f\u52a8\u7684\u6269\u5c55\u529f\u80fd\u7684\u5de5\u4f5c\u8fdb\u7a0b\u5982\u679c\u51fa\u73b0\u6545\u969c\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ef\u80fd\u4f1a\u6709\u7528\u5417\uff1f<\/p>\n<h2>\u9884\u53d6\u5f0f\u6062\u590d<\/h2>\n<p>\u8be5\u5206\u7c7b\u7684\u662f&#8221;\u5199\u524d\u65e5\u5fd7&#8221;\u3002<br \/>\n\u5728\u4f7f\u7528WAL\u8fdb\u884c\u6062\u590d\u65f6\uff0c\u5e94\u8be5\u63a7\u5236\u662f\u5426\u5c1d\u8bd5\u9884\u53d6\u5c1a\u672a\u5728\u7f13\u51b2\u6c60\u4e2d\u7684\u5757\uff0c\u8fd9\u4e9b\u5757\u5728WAL\u6bb5\u6587\u4ef6\u5185\u88ab\u5f15\u7528\u3002<br \/>\n\u8be5\u5c5e\u6027\u7684\u7c7b\u578b\u662f\u679a\u4e3e\u3002<br \/>\n\u53d6\u503c\u8303\u56f4\u4e3aon\uff0coff\uff0ctry\uff08\u9ed8\u8ba4\u503c\uff09\u3002<\/p>\n<p>\u4f3c\u4e4e &#8220;try&#8221; \u662f\u6307\u4ec5\u5f53\u64cd\u4f5c\u7cfb\u7edf\u63d0\u4f9b\u4e86 posix_fadvise \u51fd\u6570\u65f6\u624d\u542f\u7528\u9884\u53d6\u3002\u5982\u679c\u5728\u4e0d\u652f\u6301 posix_fadvise \u51fd\u6570\u7684\u73af\u5883\u4e2d\u5f00\u542f\u8be5\u9009\u9879\uff0c\u4f1a\u5bfc\u81f4\u9519\u8bef\u5417\uff1f<\/p>\n<h2>\u9012\u5f52\u5de5\u4f5c\u8868\u56e0\u5b50 (Di\u0300gu\u030c Gongzuo Yinzi)<\/h2>\n<p>\u8fd9\u4e2a\u7c7b\u522b\u662f&#8221;\u67e5\u8be2\u8ba1\u5212&#8221;\u3002<br \/>\n\u53c2\u6570\u524d\u9762\u7684\u8bf4\u660e\u3002<\/p>\n<blockquote><p>\u628a\u89c4\u5212\u5668\u5bf9\u9012\u5f52\u67e5\u8be2\u5de5\u4f5c\u8868\u5e73\u5747\u5927\u5c0f\u7684\u4f30\u8ba1\u8bbe\u7f6e\u4e3a\u67e5\u8be2\u521d\u59cb\u975e\u9012\u5f52\u9879\u4f30\u8ba1\u5927\u5c0f\u7684\u500d\u6570\u3002<\/p><\/blockquote>\n<p>\u6211\u8bfb\u4e86\u8fd9\u53e5\u8bdd\uff0c\u4f46\u8fd8\u662f\u6709\u70b9\u4e0d\u592a\u660e\u767d\u3002\u8fd9\u53e5\u8bdd\u7684\u610f\u601d\u662f\u5c06\u9012\u5f52\u67e5\u8be2\u7684\u5de5\u4f5c\u8868\u7684\u5e73\u5747\u5927\u5c0f\u8bbe\u7f6e\u4e3a\u67e5\u8be2\u7684\u9996\u4e2a\u975e\u9012\u5f52\u9879\u7684\u4f30\u8ba1\u5927\u5c0f\u7684\u500d\u6570\uff0c\u5e76\u4f5c\u4e3a\u89c4\u5212\u8005\u7684\u4f30\u8ba1\u503c\u3002<\/p>\n<p>\u5728\u6267\u884c\u9012\u5f52\u67e5\u8be2\uff0c\u5982\u56fe\u5f62\u6570\u636e\u7684\u6700\u77ed\u8def\u5f84\u641c\u7d22\u65f6\uff0c\u662f\u5426\u53ef\u4ee5\u8fdb\u884c\u8c03\u6574\u4ee5\u63d0\u9ad8\u6548\u679c\u5462\uff1f\u6700\u8fd1\u6211\u7a0d\u5fae\u7814\u7a76\u8fc7\u7c7b\u4f3c Apache AGE \u7684\u6269\u5c55\u529f\u80fd\uff0c\u4f7f\u7528\u5b83\u65f6\u662f\u5426\u4f1a\u6709\u597d\u5904\u5462\uff1f<\/p>\n<h2>\u5171\u4eab\u5185\u5b58\u5927\u5c0f<\/h2>\n<p>\u6b64\u7c7b\u522b\u79f0\u4e3a\u201c\u9884\u8bbe\u9009\u9879\u201d\u3002\u57fa\u672c\u4e0a\uff0c\u8fd9\u4e9b\u53c2\u6570\u662f\u65e0\u6cd5\u8c03\u6574\u7684\u3002<br \/>\n\u8bfb\u5230\u8bf4\u660e\u201c\u62a5\u544a\u4e3b\u5171\u4eab\u5185\u5b58\u533a\u57df\u7684\u5927\u5c0f\uff0c\u5e76\u5c06\u5176\u53d6\u6700\u63a5\u8fd1\u7684\u5146\u5b57\u8282\u4e0a\u53d6\u6574\u3002\u201d\u4f46\u5b9e\u9645\u4e0a\u4e0d\u592a\u660e\u767d\u5b83\u5230\u5e95\u5728\u8bf4\u4ec0\u4e48\u3002<\/p>\n<p>\u7136\u540e\uff0c\u9ed8\u8ba4\u503c\u662f\u4e00\u4e2a\u795e\u79d8\u7684\u6570\u5b57143\u3002\u8fd9\u4e2a\u6570\u5b57\u662f\u4ec0\u4e48\u5462&#8230;?<\/p>\n<p>\u6240\u4ee5\uff0c\u5c31\u8fd9\u4e2a\u53c2\u6570\u6765\u8bf4\uff0c\u76ee\u524d\u8fd8\u4e0d\u592a\u6e05\u695a\u5b9e\u9645\u610f\u4e49&#8230;\u3002<\/p>\n<h2>\u5de8\u9875\u9762\u4e2d\u7684\u5171\u4eab\u5185\u5b58\u5927\u5c0f<\/h2>\n<p>\u8be5\u7c7b\u522b\u88ab\u6807\u8bb0\u4e3a\u201c\u9884\u8bbe\u9009\u9879\u201d\u3002\u57fa\u672c\u4e0a\uff0c\u8fd9\u4e9b\u53c2\u6570\u662f\u65e0\u6cd5\u8fdb\u884c\u8c03\u6574\u7684\u3002<\/p>\n<p>\u9605\u8bfb\u8bf4\u660e\u540e\u53ef\u77e5\uff0c\u201c\u6839\u636e\u6307\u5b9a\u7684 huge_page_size\uff0c\u62a5\u544a\u5728\u4e3b\u5171\u4eab\u5185\u5b58\u533a\u57df\u6240\u9700\u7684huge\u9875\u9762\u6570\u3002\u5982\u679c\u4e0d\u652f\u6301huge\u9875\u9762\uff0c\u5219\u8be5\u503c\u4e3a-1\u3002\u201d\u5728\u6211\u4eec\u8fd9\u6b21\u8c03\u67e5\u7684\u73af\u5883\u4e0b\uff08Amazon Linux2\uff09\uff0c\u9ed8\u8ba4\u503c\u4e3a72\u3002\u8fd9\u4e2a\u503c\u53ef\u80fd\u662f\u5728\u8fdb\u884c\u914d\u7f6e\u65f6\u786e\u5b9a\u7684\u54e6\u2026\u2026<\/p>\n<h2>\u7edf\u8ba1\u6570\u636e\u63d0\u53d6\u7684\u4e00\u81f4\u6027<\/h2>\n<p>\u7c7b\u522b\u4e3a&#8221;\u8fd0\u884c\u65f6\u7edf\u8ba1&#8221;\u3002<br \/>\n\u51b3\u5b9a\u5728\u4e8b\u52a1\u5185\u591a\u6b21\u8bbf\u95ee\u7d2f\u79ef\u7edf\u8ba1\u503c\u7684\u884c\u4e3a\u3002<br \/>\n\u7c7b\u578b\u4e3a\u679a\u4e3e\u3002<br \/>\n\u53d6\u503c\u8303\u56f4\u5982\u4e0b\u3002<\/p>\n<div>\n<div class=\"post-table\">\u5024\u8aac\u660enone\u5171\u6709\u30e1\u30e2\u30ea\u304b\u3089\u30ab\u30a6\u30f3\u30bf\u3092\u518d\u30d5\u30a7\u30c3\u30c1\u3059\u308b\u3002cache\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3002<br \/>\npg_stat_clear_snapshot()\u304c\u547c\u3073\u51fa\u3055\u308c\u306a\u3044\u9650\u308a\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7d71\u8a08\u60c5\u5831\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u305d\u308c\u3089\u306e\u7d71\u8a08\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3002snapshotpg_stat_clear_snapshot()\u304c\u547c\u3073\u51fa\u3055\u308c\u306a\u3044\u9650\u308a\u3001\u7d71\u8a08\u60c5\u5831\u30a2\u30af\u30bb\u30b9\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u3001\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u5168\u3066\u306e\u7d71\u8a08\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3002<\/div>\n<\/div>\n<p>\u55ef\uff0ccache\u548csnapshot\u7684\u533a\u522b\u662f\u7f13\u5b58\u8303\u56f4\u7684\u4e0d\u540c\u5427\u3002<br \/>\n\u611f\u89c9\u9a8c\u8bc1\u8fd9\u4e2a\u53c2\u6570\u6709\u70b9\u9ebb\u70e6\u2026\u3002<\/p>\n<h2>\u89e3\u7801\u7f13\u51b2\u533a\u5927\u5c0f<\/h2>\n<p>\u7c7b\u522b\u662f\u201c\u5199\u524d\u65e5\u5fd7\u201d\u3002<br \/>\n\u670d\u52a1\u5668\u80fd\u591f\u5728WAL\u4e2d\u5411\u524d\u67e5\u627e\u591a\u8fdc\u4ee5\u5bfb\u627e\u9884\u53d6\u7684\u5757\u7684\u9650\u5236\u503c\u3002\u8be5\u53c2\u6570\u4e0ePostgreSQL 15\u4e2d\u65b0\u589e\u7684recovery_prefetch\u53c2\u6570\u76f8\u5173\u3002<br \/>\n\u5982\u679c\u8be5\u503c\u6ca1\u6709\u5355\u4f4d\u6307\u5b9a\uff0c\u5219\u5c06\u5176\u89c6\u4e3a\u5b57\u8282\u3002<br \/>\n\u9ed8\u8ba4\u503c\u4e3a512kB\uff08=524288\uff09\u3002<\/p>\n<h1>\u4fee\u6539\u8fc7\u7684\u53c2\u6570<\/h1>\n<h2>\u8ba1\u7b97\u67e5\u8be2\u7f16\u53f7<\/h2>\n<p>\u5728\u5024\u57df\u4e2d\u65b0\u589e\u4e86\u56de\u5f52(regress)\u3002<br \/>\n\u8ba1\u7b97\u67e5\u8be2\u6807\u8bc6\u7684\u5024\u57df\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<div>\n<div class=\"post-table\">\u5024\u57df\u610f\u5473auto\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3002<br \/>\npg_stat_statements\u306a\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u81ea\u52d5\u7684\u306b\u6709\u52b9\u306b\u3059\u308b\u3002off\u5e38\u306b\u7121\u52b9\u306b\u3059\u308b\u3002on\u5e38\u306b\u6709\u52b9\u306b\u3059\u308b\u3002regress\u81ea\u52d5\u56de\u5e30\u30c6\u30b9\u30c8\u3092\u5bb9\u6613\u306b\u3059\u308b\u305f\u3081\u306bEXPLAIN\u51fa\u529b\u306b\u554f\u3044\u5408\u308f\u305b\u8b58\u5225\u5b50\u3092\u8868\u793a\u3057\u306a\u3044\u3053\u3068\u4ee5\u5916\u306fauto\u3068\u540c\u3058\u52b9\u679c\u3092\u6301\u3064\u3002<br \/>\n\u3053\u306e\u5024\u57df\u304c\u4ee5\u524d\u306e\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3082\u30d0\u30c3\u30af\u30dd\u30fc\u30c8\u3055\u308c\u305f\u306e\u306f\u3001\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u304cok\u306b\u306a\u3089\u306a\u3044\u3001\u3068\u3044\u3063\u305f\u554f\u984c\u304c\u3042\u3063\u305f\u304b\u3089\u306a\u306e\u3060\u308d\u3046\u304b\u3002<\/div>\n<\/div>\n<p>\u5b9e\u9645\u4e0a\uff0c\u8fd9\u4e2a\u6570\u503c\u8303\u56f4\u7684\u6dfb\u52a0\u4e5f\u88ab\u6700\u8fd1\u7684\u6b21\u8981\u7248\u672c\u5347\u7ea7\uff08\u4f8b\u5982\uff1aPostgreSQL 14.3\uff09\u8fdb\u884c\u4e86\u5411\u524d\u517c\u5bb9\u30022<br \/>\n\uff08\u56e0\u6b64\uff0c\u5728\u6bd4\u8f83 PostgreSQL 14.3 \u548c PostgreSQL 15beta1 \u65f6\u65e0\u6cd5\u68c0\u6d4b\u5230&#8230;&#8230;\uff09<\/p>\n<div>\n<div class=\"post-table\">\u30d0\u30fc\u30b8\u30e7\u30f3\u5024\u57dfPostgreSQL 14.2auto,on,offPostgreSQL 14.3auto,regress,on,offPostgreSQL 15 beta1auto,regress,on,off<\/div>\n<\/div>\n<h2>\u54c8\u5e0c\u5185\u5b58\u4e58\u6570<\/h2>\n<p>\u9ed8\u8ba4\u503c\u4ece1.0\u66f4\u6539\u4e3a2.0\u3002<\/p>\n<p>\u7528\u4e8e\u8ba1\u7b97\u53ef\u7528\u4e8e\u6563\u5217\u57fa\u7840\u64cd\u4f5c\u7684\u6700\u5927\u5185\u5b58\u91cf\u3002\u5b83\u662f\u5c06 hash_mem_multiplier \u4e58\u4ee5 work_mem \u7684\u7ed3\u679c\u3002PostgreSQL 15 \u7684\u9ed8\u8ba4\u503c\u4e3a 2.0\uff0c\u8fd9\u610f\u5473\u7740\u6563\u5217\u8fd0\u7b97\u901a\u5e38\u4f1a\u4f7f\u7528\u666e\u901a work_mem \u7684\u4e24\u500d\u5185\u5b58\u3002<\/p>\n<p>\u8fd9\u4e2a\u53c2\u6570\u662f\u4ecePostgreSQL 13\u5f00\u59cb\u6dfb\u52a0\u7684\uff0c\u4f46\u5b9e\u9645\u4e0a\u6211\u4ece\u6765\u6ca1\u6709\u6b63\u786e\u5730\u8fdb\u884c\u8c03\u6574\u8fc7&#8230;<\/p>\n<h2>\u65e5\u5fd7\u76ee\u6807<\/h2>\n<p>\u5728\u503c\u57df\u4e2d\u6dfb\u52a0\u4e86jsonlog\u3002<br \/>\njsonlog\u6309\u540d\u79f0\u5c06\u670d\u52a1\u5668\u65e5\u5fd7\u4ee5JSON\u683c\u5f0f\u8f93\u51fa\u3002<br \/>\n\u4e3a\u4e86\u4ee5JSON\u683c\u5f0f\u8f93\u51fa\uff0c\u9700\u8981\u5c06logging_collector\u8bbe\u7f6e\u4e3aon\u3002<br \/>\nJSON\u683c\u5f0f\u6587\u4ef6\u7684\u8f93\u51fa\u4f4d\u7f6e\u9ed8\u8ba4\u4e3alog\/postgresql.json\u3002<br \/>\nJSON\u683c\u5f0f\u7684\u670d\u52a1\u5668\u65e5\u5fd7\u5c06\u5448\u73b0\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"p\">{<\/span><span class=\"nl\">\"timestamp\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"2022-05-22 09:15:50.883 JST\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"pid\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">21357<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"session_id\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"628980b6.536d\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"line_num\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">5<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"session_start\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"2022-05-22\r\n09:15:50 JST\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"txid\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"error_severity\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"LOG\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"message\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"database system is ready to accept connections\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"backend_type\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"post\r\nmaster\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"query_id\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">0<\/span><span class=\"p\">}<\/span>\r\n<span class=\"p\">{<\/span><span class=\"nl\">\"timestamp\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"2022-05-22 09:17:24.220 JST\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"user\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"postgres\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"dbname\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"postgres\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"pid\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">21376<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"remote_host\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"[local]\"<\/span><span class=\"p\">,<\/span><span class=\"s2\">\"session\r\n_id\"<\/span><span class=\"err\">:<\/span><span class=\"s2\">\"628980e6.5380\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"line_num\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"ps\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"SELECT\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"session_start\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"2022-05-22 09:16:38 JST\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"vxid\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"3\/6\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"txid\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"s2\">\"error_severi\r\nty\"<\/span><span class=\"err\">:<\/span><span class=\"s2\">\"ERROR\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"state_code\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"42703\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"message\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"column <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">hoge<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> does not exist\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"statement\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"SELECT hoge;\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"cursor_position\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">8<\/span><span class=\"p\">,<\/span><span class=\"s2\">\"a\r\npplication_name\"<\/span><span class=\"err\">:<\/span><span class=\"s2\">\"psql\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"backend_type\"<\/span><span class=\"p\">:<\/span><span class=\"s2\">\"client backend\"<\/span><span class=\"p\">,<\/span><span class=\"nl\">\"query_id\"<\/span><span class=\"p\">:<\/span><span class=\"mi\">0<\/span><span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u7528\u4eba\u7c7b\u89c6\u89d2\u6765\u770b\uff0c\u8be5\u6587\u672c\u7684\u53ef\u8bfb\u6027\u5e76\u4e0d\u597d\uff0c\u4f46\u5982\u679c\u4f7f\u7528\u7a0b\u5e8f\u6765\u5904\u7406\u670d\u52a1\u5668\u65e5\u5fd7\uff0c\u5219\u53ef\u80fd\u4f1a\u66f4\u8f7b\u677e\u3002\u5173\u4e8ejsonlog\u7684\u8f93\u51fa\u683c\u5f0f\uff0c\u5c06\u5728\u53e6\u4e00\u7bc7\u8bf4\u660e\u6587\u7ae0\u4e2d\u8865\u5145\u89e3\u91ca\u3002<\/p>\n<h2>\u81ea\u52a8\u6e05\u7406\u6700\u5c0f\u6301\u7eed\u65f6\u95f4<\/h2>\n<p>\u9ed8\u8ba4\u503c\u4ece-1\u66f4\u6539\u4e3a60000\u6beb\u79d2\u3002<br \/>\n-1\u7528\u4e8e\u7981\u7528\u65e5\u5fd7\u8bb0\u5f55\uff0c\u5f53\u81ea\u52a8\u6e05\u6d01\u9700\u8981\u5f88\u957f\u65f6\u95f4\u65f6\uff0c\u4f46\u73b0\u5728\u9ed8\u8ba4\u503c\u5df2\u66f4\u6539\u4e3a\u8d85\u8fc760\u79d2\u65f6\u4f1a\u8bb0\u5f55\u65e5\u5fd7\u3002<\/p>\n<h2>\u68c0\u67e5\u70b9\u8bb0\u5f55<\/h2>\n<p>\u9ed8\u8ba4\u503c\u4ece\u5173\u95ed\u53d8\u4e3a\u5f00\u542f\u3002<br \/>\n\u5f53\u51fa\u73b0\u6027\u80fd\u95ee\u9898\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u67e5\u770b\u670d\u52a1\u5668\u65e5\u5fd7\u6765\u786e\u8ba4\u662f\u5426\u4e0e\u68c0\u67e5\u70b9\u6709\u5173\uff0c\u4f46\u6709\u65f6\u5373\u4f7f\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u4e5f\u65e0\u6cd5\u67e5\u770b\u5230\u4e0e\u68c0\u67e5\u70b9\u76f8\u5173\u7684\u65e5\u5fd7\uff0c\u56e0\u6b64\u6709\u53ef\u80fd\u65e0\u6cd5\u5f97\u77e5\u60c5\u51b5\u3002\u901a\u8fc7\u5c06\u9ed8\u8ba4\u503c\u8bbe\u4e3a\u5f00\u542f\uff0c\u53ef\u80fd\u53ef\u4ee5\u907f\u514d\u8fd9\u79cd\u4ee4\u4eba\u9057\u61be\u7684\u60c5\u51b5\u53d1\u751f\u3002<\/p>\n<h2>\u8d5b\u9053_*<\/h2>\n<p>\u6ca1\u6709\u66f4\u6539\u9ed8\u8ba4\u503c\u7b49\u3002<br \/>\n\u53ea\u6709\u53d8\u91cf\u7684\u7c7b\u522b(category)\u53d1\u751f\u4e86\u53d8\u5316\u3002<\/p>\n<div>\n<div class=\"post-table\">\u30d0\u30fc\u30b8\u30e7\u30f3\u30ab\u30c6\u30b4\u30eaPostgreSQL 14Statistics \/ Query and Index Statistics CollectorPostgreSQL 15Cumulative Query and Index Statistics<\/div>\n<\/div>\n<p>\u76ee\u6807\u53d8\u91cf\u6709\u4ee5\u4e0b\u516d\u4e2a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">track_activities<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">track_activity_query_size<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">track_counts<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">track_functions<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">track_io_timing<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">track_wal_io_timing<\/ul>\n<h2>\u534e\u5c14\u8857\u6570\u636e\u538b\u7f29<\/h2>\n<p>\u5e03\u5c14\u7c7b\u578b\u5df2\u7ecf\u88ab\u66f4\u6539\u4e3a\u679a\u4e3e\u7c7b\u578b\u3002<br \/>\n\u6b64\u5916\uff0c\u503c\u7684\u8303\u56f4\u4e5f\u5df2\u88ab\u66f4\u6539\u5982\u4e0b\u3002<\/p>\n<div>\n<div class=\"post-table\">\u5024\u57df\u30d0\u30fc\u30b8\u30e7\u30f3\u8aac\u660eoffPostgreSQL 14<br \/>\nPostgreSQL 15\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3002<br \/>\n\u5727\u7e2e\u3092\u884c\u308f\u306a\u3044\u3002onPostgreSQL14<br \/>\nPostgreSQL 15\u5727\u7e2e\u3092\u884c\u3046\u3002\u3053\u308c\u304c\u6307\u5b9a\u3055\u308c\u305f\u5834\u5408\u3001pglz\u304c\u6307\u5b9a\u3055\u308c\u305f\u3082\u306e\u3068\u540c\u7fa9\u3068\u306a\u308b\u3002<sup><a id=\"fnref-3\" href=\"#fn-3\">3<\/a><\/sup>pglzPostgreSQL 15pglz\u65b9\u5f0f\uff08PostgreSQL\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5727\u7e2e\u65b9\u5f0f\uff09\u306b\u3088\u308b\u5727\u7e2e\u3092\u884c\u3046\u3002lz4PostgreSQL 15lz4\u65b9\u5f0f\u306b\u3088\u308b\u5727\u7e2e\u3092\u884c\u3046\u3002<br \/>\n\u3053\u306e\u6307\u5b9a\u306f<code>--with-lz4<\/code>\u6307\u5b9a\u3064\u304d\u3067configure\uff06\u30d3\u30eb\u30c9\u3055\u308c\u305f\u5834\u5408\u306b\u6709\u52b9\u3068\u306a\u308b\u3002zstdPostgreSQL 15zstd\u65b9\u5f0f\u306b\u3088\u308b\u5727\u7e2e\u3092\u884c\u3046\u3002<br \/>\n\u3053\u306e\u6307\u5b9a\u306f<code>--with-zstd<\/code>\u6307\u5b9a\u3064\u304d\u3067configure\uff06\u30d3\u30eb\u30c9\u3055\u308c\u305f\u5834\u5408\u306b\u6709\u52b9\u3068\u306a\u308b\u3002<\/div>\n<\/div>\n<p>\u8be5\u53c2\u6570\u63a7\u5236\u662f\u5426\u538b\u7f29\u5728full_page_writes\u4e3aon\u65f6\uff0c\u6216\u5728\u57fa\u672c\u5907\u4efd\u671f\u95f4\u5199\u5165WAL\u7684\u5b8c\u6574\u9875\u56fe\u50cf\u3002\u8fd9\u7c7b\u53c2\u6570\u4f3c\u4e4e\u662fTOAST\u538b\u7f29\u65b9\u6cd5\u7684\u5ef6\u4f38\uff0c\u8be5\u65b9\u6cd5\u4ecePostgreSQL 14\u5f00\u59cb\u5f15\u5165\uff08\u73b0\u5728\u652f\u6301pglz\u548clz4\uff09\uff0c\u5e76\u6269\u5c55\u5230WAL\u7684\u5b8c\u6574\u9875\u56fe\u50cf\u3002<\/p>\n<h1>\u88ab\u5220\u9664\u7684\u53c2\u6570<\/h1>\n<h2>\u7edf\u8ba1\u4e34\u65f6\u76ee\u5f55<\/h2>\n<p>\u5c3d\u7ba1\u6ca1\u6709\u8be6\u7ec6\u5217\u51fa\u539f\u56e0\uff0c\u4f46\u4f3c\u4e4e\u5728PostgreSQL 15\u4e2d\u88ab\u79fb\u9664\u3002<\/p>\n<blockquote><p>\u79fb\u9664\u4e0d\u5fc5\u8981\u7684\u670d\u52a1\u5668\u53d8\u91cfstats_temp_directory\uff08Andres Freund\uff0cKyotaro Horiguchi\uff09\u3002<\/p><\/blockquote>\n<p>\u9019\u500b\u53c3\u6578\u662f\u7528\u4f86\u8a2d\u7f6e\u81e8\u6642\u7d71\u8a08\u8cc7\u6599\u5b58\u5132\u76ee\u9304\u7684\uff0c\u9ed8\u8a8d\u503c\u662fpg_stat_tmp\uff08\u76f8\u5c0d\u65bc\u6578\u64da\u5eab\u96c6\u7fa4\u7684\u8def\u5f91\uff09\u3002\u9019\u500b\u53c3\u6578\u4e4b\u6240\u4ee5\u53ef\u8abf\u6574\u662f\u56e0\u70ba\u3002\u3002\u3002<\/p>\n<blockquote><p>\u901a\u8fc7\u6307\u5b9a\u57fa\u4e8eRAM\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u53ef\u4ee5\u51cf\u5c11\u7269\u7406I\/O\u9700\u6c42\uff0c\u5e76\u6709\u53ef\u80fd\u63d0\u9ad8\u6027\u80fd\u3002<\/p><\/blockquote>\n<p>\u6709\u8fd9\u6837\u7684\u4e00\u4e2a\u6545\u4e8b\uff0c\u5173\u4e8e\u5728 PostgreSQL 15 \u7684\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u662f\u5426\u88ab\u5220\u9664\u4e86\uff0c\u6bd5\u7adf\u6ca1\u6709\u592a\u5927\u7684\u6548\u679c\u2026\u2026\uff08\u6211\u6ca1\u6709\u4e00\u76f4\u8ffd\u8e2a hacker-ml \u7684\u8fdb\u5c55\uff09\u3002<\/p>\n<h1>\u6700\u540e<\/h1>\n<p>\u6839\u636e\u76ee\u524d\u6765\u770b\uff0cPostgreSQL 15 \u7684\u8bb8\u591a\u8bbe\u7f6e\u53c2\u6570\u4f3c\u4e4e\u53d1\u751f\u4e86\u53d8\u5316\u3002<br \/>\n\u7531\u4e8e\u672c\u6587\u53ea\u662f\u4e00\u4e2a\u684c\u9762\u7814\u7a76\uff0c\u6240\u4ee5\u4ee5\u540e\u6211\u60f3\u5b9e\u9645\u64cd\u4f5c\u6bcf\u4e2a\u529f\u80fd\uff0c\u786e\u8ba4\u589e\u52a0\u4e86\u54ea\u4e9b\u65b0\u529f\u80fd\u3002<br \/>\n\u6b64\u5916\uff0c\u8fd9\u4e2a\u8c03\u67e5\u7ed3\u679c\u4ec5\u4ec5\u662f beta1 \u7248\u672c\u7684\u7ed3\u679c\uff0c\u56e0\u6b64\u5728\u4e4b\u540e\u7684 beta2 \u7248\u672c\u53ca\u4ee5\u540e\u53ef\u80fd\u4f1a\u6709\u53d8\u5316\u3002\u6211\u6253\u7b97\u5728 beta2 \u7248\u672c\u53ca\u4ee5\u540e\u7684\u53d1\u5e03\u4e2d\u91cd\u65b0\u786e\u8ba4\u3002<\/p>\n<section>\u56e0\u4e3a\u5b58\u5728\u679a\u4e3e\u503c\u8303\u56f4\u7684\u5dee\u5f02\u6a21\u5f0f\uff0c\u6240\u4ee5\u6211\u4eec\u5728SELECT\u8bed\u53e5\u4e2d\u6dfb\u52a0\u4e86enumvals\u3002\u611f\u8c22nori_shinoda\u5148\u751f\u63d0\u51fa\u7684\u5efa\u8bae\u3002\u21a9\u8fd9\u4e2a\u63d0\u4ea4\u7684commitid\u662febf6c5249b7db525e59563fb149642665c88f747\u3002\u6211\u662f\u4ecenori_shinoda\u5148\u751f\u90a3\u91cc\u5b66\u5230\u7684\u3002\u21a9<\/p>\n<p>\u6211\u770b\u4e86\u4e00\u4e0b`.\/backend\/utils\/misc\/guc.c`\uff0c\u7136\u540e\u505a\u51fa\u4e86\u8fd9\u4e2a\u5224\u65ad\u3002\u503c\u57df\u4f3c\u4e4e\u4e0d\u4ec5\u9650\u4e8eon\/off\uff0c\u800c\u4e14\u8fd8\u63a5\u53d7true\/false\u3001yes\/no\u548c1\/0\u3002\u21a9<\/p>\n<p>\u901a\u8fc7\u7814\u7a76\u8fd9\u4e2a\u53c2\u6570\uff0c\u6211\u4e86\u89e3\u5230\u5728PostgreSQL\u4e2d\u4e5f\u53ef\u4ee5\u4f7f\u7528zstd\u538b\u7f29\u65b9\u6cd5\u3002\u8fd9\u610f\u5473\u7740\u5173\u4e8eTOAST\u538b\u7f29\u4e5f\u6709\u4e86\u65b0\u7684\u9009\u62e9\u5427\uff1f\u21a9<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u55b5~\u3002 \u5c31\u50cf\u5e73\u5e38\u4e00\u6837\uff0c\u73b0\u5728\u662f\u8fdb\u884c PostgreSQL \u65b0\u7248\u672c\u5dee\u5f02\u9884\u8c03\u7814\u7684\u65f6\u671f\u4e86\u3002 \u6240\u4ee5\uff0c\u8fd9\u6b21\u6211\u4eec\u6765\u7814\u7a76 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-42183","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15\u5373\u5c06\u5230\u6765\uff0c1-\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u55b5~\u3002 \u5c31\u50cf\u5e73\u5e38\u4e00\u6837\uff0c\u73b0\u5728\u662f\u8fdb\u884c PostgreSQL \u65b0\u7248\u672c\u5dee\u5f02\u9884\u8c03\u7814\u7684\u65f6\u671f\u4e86\u3002 \u6240\u4ee5\uff0c\u8fd9\u6b21\u6211\u4eec\u6765\u7814\u7a76 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15\u5373\u5c06\u5230\u6765\uff0c1-\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-03T20:31:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T12:27:45+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/\",\"name\":\"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-03T20:31:13+00:00\",\"dateModified\":\"2024-04-30T12:27:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02 - Blog - Silicon Cloud","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:\/\/www.silicloud.com\/zh\/blog\/postgresql-15\u5373\u5c06\u5230\u6765\uff0c1-\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02","og_description":"\u9996\u5148 \u55b5~\u3002 \u5c31\u50cf\u5e73\u5e38\u4e00\u6837\uff0c\u73b0\u5728\u662f\u8fdb\u884c PostgreSQL \u65b0\u7248\u672c\u5dee\u5f02\u9884\u8c03\u7814\u7684\u65f6\u671f\u4e86\u3002 \u6240\u4ee5\uff0c\u8fd9\u6b21\u6211\u4eec\u6765\u7814\u7a76 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15\u5373\u5c06\u5230\u6765\uff0c1-\u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-03T20:31:13+00:00","article_modified_time":"2024-04-30T12:27:45+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/","name":"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-03T20:31:13+00:00","dateModified":"2024-04-30T12:27:45+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL 15\u5373\u5c06\u5230\u6765\uff0c(1) \u914d\u7f6e\u53c2\u6570\u7684\u5dee\u5f02"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/postgresql-15%e5%8d%b3%e5%b0%86%e5%88%b0%e6%9d%a5%ef%bc%8c1-%e9%85%8d%e7%bd%ae%e5%8f%82%e6%95%b0%e7%9a%84%e5%b7%ae%e5%bc%82%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=42183"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42183\/revisions"}],"predecessor-version":[{"id":94120,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42183\/revisions\/94120"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=42183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=42183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=42183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}