{"kind": "storage", "major": "18", "item": {"slug": "storage-file-layout", "name": "Database File Layout", "name_zh": "", "category": "\u7269\u7406\u7ed3\u6784", "summary": "\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002", "aliases": [], "content_hash": "c600f9f7fc5c64d078aa234b878c09b65cf4a489882316dbf880f309f78ec4f7", "versions": {"10": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/relopts/?v=10", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "10.23", "major": "10", "channel": "stable", "revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "sources": [{"url": "https://pg.center/docs/10/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 10 English manual", "sha256": "093b3f235454c71a726c19d2a533af52677d400170ccbc8f4b8cab5cfb19946a", "language": "en", "original_url": "/docs/10/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">67.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 67.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 67.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div>\n<br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 67.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 67.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 67.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 67.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 67.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/10/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/10/app-psql.html", "method": "same-major semantic node", "sha256": "07e2383663e136e49c565dc43b76b773af4caa89393ce1854d32ec8cc15f2d3c", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[41]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "This section describes the storage format at the level of files and directories.", "/versions/10/facts/0/label": "Definition scope", "/versions/10/facts/0/value": "Same-version core physical storage documentation", "/versions/10/tables/0/title": "Contents of PGDATA", "/versions/10/related/0/label": "Storage Parameters", "/versions/10/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/10/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/10/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/10/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/10/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/10/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/10/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/10/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/10/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/10/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/10/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/10/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/10/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/10/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/10/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/10/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/10/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/10/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/10/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/10/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/10/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/10/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/10/tables/0/columns/0/label": "Item", "/versions/10/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "25575de4e42722af0a2776bbffb7a418989792ef4e20dd9dd7f2c07e3ef59abe"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "bebaeb5de90eb933431406daaddd1810670aa67cc94528145482ee440283127e", "manual_language": "zh"}, "11": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/relopts/?v=11", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "stable", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "https://pg.center/docs/11/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 11 English manual", "sha256": "cbed09542ca2b0c2412d9e0810e5283a7626385224a23e094412d8f62be81985", "language": "en", "original_url": "/docs/11/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">69.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 69.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 69.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 69.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 69.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 69.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 69.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 69.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/11/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/app-psql.html", "method": "same-major semantic node", "sha256": "01339254dd1dc30d095af846d0b6a7c01f96338187a6fbb8cf45290d5941196b", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[41]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "This section describes the storage format at the level of files and directories.", "/versions/11/facts/0/label": "Definition scope", "/versions/11/facts/0/value": "Same-version core physical storage documentation", "/versions/11/tables/0/title": "Contents of PGDATA", "/versions/11/related/0/label": "Storage Parameters", "/versions/11/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/11/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/11/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/11/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/11/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/11/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/11/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/11/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/11/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/11/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/11/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/11/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/11/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/11/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/11/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/11/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/11/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/11/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/11/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/11/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/11/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/11/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/11/tables/0/columns/0/label": "Item", "/versions/11/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "e36ea464132bdf763baf41b47f3737cb8b228a15ab8a0293db8658e148e6dbcc"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "bebaeb5de90eb933431406daaddd1810670aa67cc94528145482ee440283127e", "manual_language": "zh"}, "12": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=12", "label": "Table AM"}, {"url": "/wiki/relopts/?v=12", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "stable", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "https://pg.center/docs/12/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 12 English manual", "sha256": "cb2e82b933c3712adaf61cc5a26d266e9f007698df549f999db9962bb6f39823", "language": "en", "original_url": "/docs/12/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">69.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 69.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 69.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08Windows \u4e0a\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 69.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 69.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 69.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 69.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 69.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/12/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/app-psql.html", "method": "same-major semantic node", "sha256": "1eb88d17f6ce811d722e5c4ed036f78a7872bf88410c08db794c428e3cfc98ce", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[41]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "This section describes the storage format at the level of files and directories.", "/versions/12/facts/0/label": "Definition scope", "/versions/12/facts/0/value": "Same-version core physical storage documentation", "/versions/12/tables/0/title": "Contents of PGDATA", "/versions/12/related/1/label": "Storage Parameters", "/versions/12/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/12/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/12/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/12/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/12/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/12/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/12/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/12/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/12/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/12/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/12/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/12/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/12/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/12/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/12/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/12/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/12/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/12/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/12/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/12/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/12/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/12/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/12/tables/0/columns/0/label": "Item", "/versions/12/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "10a1b3f0f356ad6efef8f13f795e893e2ee9c5c2752c6954c2a98a0040f353e7"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "bebaeb5de90eb933431406daaddd1810670aa67cc94528145482ee440283127e", "manual_language": "zh"}, "13": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=13", "label": "Table AM"}, {"url": "/wiki/relopts/?v=13", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "stable", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "https://pg.center/docs/13/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 13 English manual", "sha256": "2c839dc903912e2950982d087d63ebb1a03d2818c75443e237320784aa6443f8", "language": "en", "original_url": "/docs/13/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">69.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 69.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 69.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 69.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 69.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 69.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 69.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 69.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/13/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/app-psql.html", "method": "same-major semantic node", "sha256": "dd2bf63d81b9a9d3fc69c646197cfdc14a0b1bab1c9f0b98608d66554da4a261", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[49]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "This section describes the storage format at the level of files and directories.", "/versions/13/facts/0/label": "Definition scope", "/versions/13/facts/0/value": "Same-version core physical storage documentation", "/versions/13/tables/0/title": "Contents of PGDATA", "/versions/13/related/1/label": "Storage Parameters", "/versions/13/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/13/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/13/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/13/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/13/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/13/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/13/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/13/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/13/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/13/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/13/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/13/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/13/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/13/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/13/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/13/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/13/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/13/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/13/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/13/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/13/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/13/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/13/tables/0/columns/0/label": "Item", "/versions/13/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "931e5b421e8b3739fd227a3d38281da4c11065ba107b4b8e6536fd2c24601c37"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "14": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=14", "label": "Table AM"}, {"url": "/wiki/relopts/?v=14", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "https://pg.center/docs/14/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 14 English manual", "sha256": "6321dbd90cb8a8dfdc90c0e1caeaf3d480705176bba0428510fd986fe681eae3", "language": "en", "original_url": "/docs/14/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">70.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 70.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 70.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 70.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 70.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 70.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 70.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 70.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/14/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/app-psql.html", "method": "same-major semantic node", "sha256": "11c74f85ef9d2c9b3921e0c622d69dd3f1b3ed0c916197a94ddab5540153e310", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[49]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "This section describes the storage format at the level of files and directories.", "/versions/14/facts/0/label": "Definition scope", "/versions/14/facts/0/value": "Same-version core physical storage documentation", "/versions/14/tables/0/title": "Contents of PGDATA", "/versions/14/related/1/label": "Storage Parameters", "/versions/14/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/14/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/14/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/14/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/14/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/14/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/14/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/14/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/14/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/14/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/14/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/14/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/14/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/14/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/14/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/14/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/14/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/14/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/14/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/14/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/14/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/14/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/14/tables/0/columns/0/label": "Item", "/versions/14/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "3c1e6be68a9704576df4070d004804acaff70203be6663b163889bc165faf456"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "15": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=15", "label": "Table AM"}, {"url": "/wiki/relopts/?v=15", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "https://pg.center/docs/15/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 15 English manual", "sha256": "01868f8e03e8749d2c1b113ab2988c459ac44259ce7416677e981e41e33015ea", "language": "en", "original_url": "/docs/15/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">73.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 73.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 73.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 73.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 73.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 73.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 73.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 73.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/15/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/app-psql.html", "method": "same-major semantic node", "sha256": "8d6ed2e3400192f466dca73fd9423e91b9ede916fe0981b7e0cd42bc091394d2", "language": "zh", "matched_nodes": ["#APP-PSQL/div[7]/div[3]/div[10]/dl[0]/dd[51]/div[1]/h3[0]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "This section describes the storage format at the level of files and directories.", "/versions/15/facts/0/label": "Definition scope", "/versions/15/facts/0/value": "Same-version core physical storage documentation", "/versions/15/tables/0/title": "Contents of PGDATA", "/versions/15/related/1/label": "Storage Parameters", "/versions/15/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/15/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/15/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/15/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/15/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/15/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/15/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/15/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/15/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/15/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/15/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/15/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/15/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/15/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/15/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/15/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/15/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/15/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/15/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/15/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/15/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/15/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/15/tables/0/columns/0/label": "Item", "/versions/15/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "c68c26c9d6f05254c16f0220c0381e75f052bb1858ed5ccb5659088b5da100cb"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "16": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=16", "label": "Table AM"}, {"url": "/wiki/relopts/?v=16", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "https://pg.center/docs/16/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 16 English manual", "sha256": "f03daad7b39b5df902b4bc6e6f856e65af368a8507ffbf02199804aa4b0d0bd5", "language": "en", "original_url": "/docs/16/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">73.1. \u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\">PGDATA \u5305\u542b\u591a\u4e2a\u5b50\u76ee\u5f55\u4e0e\u63a7\u5236\u6587\u4ef6\uff0c\u89c1\u8868 73.1\u3002\u9664\u8fd9\u4e9b\u5fc5\u8981\u5185\u5bb9\u5916\uff0c\u96c6\u7fa4\u914d\u7f6e\u6587\u4ef6 postgresql.conf\u3001pg_hba.conf \u548c pg_ident.conf \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u4e8e PGDATA\uff0c\u4f46\u4e5f\u53ef\u4ee5\u653e\u5728\u5176\u4ed6\u4f4d\u7f6e\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\">\u8868 73.1\uff1aPGDATA \u7684\u5185\u5bb9</p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u72ec\u7acb\u6587\u4ef6\u4e2d\u3002\u666e\u901a\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u53d6\u81ea\u8868\u6216\u7d22\u5f15\u7684 filenode \u7f16\u53f7\uff0c\u53ef\u5728 pg_class.relfilenode \u4e2d\u67e5\u5230\u3002\u4e34\u65f6\u5173\u7cfb\u7684\u6587\u4ef6\u540d\u4e3a tBBB_FFF\uff0c\u5176\u4e2d BBB \u662f\u521b\u5efa\u6587\u4ef6\u7684\u540e\u7aef ID\uff0cFFF \u662f filenode \u7f16\u53f7\u3002\u9664\u4e3b\u6587\u4ef6\uff08\u4e3b\u5206\u53c9\uff09\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\uff08\u53c2\u89c1\u7b2c 73.3 \u8282\uff09\uff0c\u8bb0\u5f55\u5173\u7cfb\u4e2d\u7684\u53ef\u7528\u7a7a\u95f4\uff0c\u6587\u4ef6\u540d\u4e3a filenode \u52a0 _fsm \u540e\u7f00\u3002\u8868\u8fd8\u5177\u6709 _vm \u540e\u7f00\u7684\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\uff0c\u7528\u4e8e\u8ddf\u8e2a\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u7684\u9875\u9762\uff0c\u8be6\u60c5\u53c2\u89c1\u7b2c 73.4 \u8282\u3002\u65e0\u65e5\u5fd7\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u53c9\uff0c\u5373\u521d\u59cb\u5316\u5206\u53c9\uff0c\u4f7f\u7528 _init \u540e\u7f00\uff08\u53c2\u89c1\u7b2c 73.5 \u8282\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u8868\u7684\u67d0\u4e9b\u5217\u53ef\u80fd\u5305\u542b\u5927\u503c\uff0c\u8868\u5c31\u4f1a\u5173\u8054\u4e00\u4e2a TOAST \u8868\uff0c\u7528\u4e8e\u5c06\u8fc7\u5927\u3001\u65e0\u6cd5\u653e\u5165\u6b63\u5e38\u8868\u884c\u7684\u5b57\u6bb5\u503c\u5b58\u50a8\u5728\u884c\u5916\u3002\u82e5\u6709\u5173\u8054\uff0cpg_class.reltoastrelid \u4f1a\u5c06\u8be5\u8868\u8fde\u63a5\u5230\u5176 TOAST \u8868\u3002\u66f4\u591a\u4fe1\u606f\u89c1\u7b2c 73.2 \u8282\u3002</p>\n<p lang=\"zh\">\u8868\u4e0e\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728\u7b2c 73.6 \u8282\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/16/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/storage-file-layout.html", "method": "same-major semantic node", "sha256": "48e790262e9e85bed1ff8a46ded4fba4648f10ae4c6e2721d50efcafbc99baf4", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[9]/h3[0]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "This section describes the storage format at the level of files and directories.", "/versions/16/facts/0/label": "Definition scope", "/versions/16/facts/0/value": "Same-version core physical storage documentation", "/versions/16/tables/0/title": "Contents of PGDATA", "/versions/16/related/1/label": "Storage Parameters", "/versions/16/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/16/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/16/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/16/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/16/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/16/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/16/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/16/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/16/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/16/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/16/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/16/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/16/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/16/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/16/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/16/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/16/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/16/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/16/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/16/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/16/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/16/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/16/tables/0/columns/0/label": "Item", "/versions/16/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "5d247e4ef774e54d1e5249e9bd0075c37ee84978473901fc51103ab21c648635"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "17": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=17", "label": "Table AM"}, {"url": "/wiki/relopts/?v=17", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "https://pg.center/docs/17/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 17 English manual", "sha256": "f3de9587ca7d02f068a4307639ba9e24f7e90a722f8e71b496428de6aaba8652", "language": "en", "original_url": "/docs/17/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">65.1.\u00a0\u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40 </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">PGDATA</code> \u76ee\u5f55\u5305\u542b\u82e5\u5e72\u5b50\u76ee\u5f55\u548c\u63a7\u5236\u6587\u4ef6\uff0c\u5982<a class=\"xref\" href=\"/docs/17/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"\u8868\u00a065.1.\u00a0PGDATA \u7684\u5185\u5bb9\">\u8868\u00a065.1</a>\u6240\u793a\u3002\u9664\u8fd9\u4e9b\u5fc5\u9700\u9879\u4e4b\u5916\uff0c\u96c6\u7c07\u914d\u7f6e\u6587\u4ef6 <code class=\"filename\">postgresql.conf</code>\u3001<code class=\"filename\">pg_hba.conf</code> \u548c <code class=\"filename\">pg_ident.conf</code> \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u5728 <code class=\"varname\">PGDATA</code> \u4e2d\uff0c\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u628a\u5b83\u4eec\u653e\u5728\u5176\u4ed6\u5730\u65b9\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a065.1.\u00a0<code class=\"varname\">PGDATA</code> \u7684\u5185\u5bb9</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u5bf9\u4e8e\u666e\u901a\u5173\u7cfb\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4ee5\u8868\u6216\u7d22\u5f15\u7684<em class=\"firstterm\">\u6587\u4ef6\u8282\u70b9</em>\u7f16\u53f7\u547d\u540d\uff0c\u8be5\u7f16\u53f7\u53ef\u5728 <code class=\"structname\">pg_class</code>.<code class=\"structfield\">relfilenode</code> \u4e2d\u627e\u5230\u3002\u4f46\u5bf9\u4e8e\u4e34\u65f6\u5173\u7cfb\uff0c\u6587\u4ef6\u540d\u7684\u5f62\u5f0f\u4e3a <code class=\"literal\">t<em class=\"replaceable\"><code>BBB</code></em>_<em class=\"replaceable\"><code>FFF</code></em></code>\uff0c\u5176\u4e2d <em class=\"replaceable\"><code>BBB</code></em> \u662f\u521b\u5efa\u8be5\u6587\u4ef6\u7684\u540e\u7aef\u8fdb\u7a0b\u53f7\uff0c<em class=\"replaceable\"><code>FFF</code></em> \u662f\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u3002\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u9664\u4e86\u4e3b\u6587\u4ef6\uff08\u4e5f\u79f0\u4e3b\u5206\u652f\uff09\u4e4b\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a<em class=\"firstterm\">\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04</em>\uff08\u89c1<a class=\"xref\" href=\"/docs/17/storage-fsm.html\" title=\"65.3.\u00a0\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\">\u7b2c\u00a065.3\u00a0\u8282</a>\uff09\uff0c\u7528\u4e8e\u5b58\u50a8\u8be5\u5173\u7cfb\u53ef\u7528\u7a7a\u95f2\u7a7a\u95f4\u7684\u4fe1\u606f\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u5b58\u653e\u5728\u4ee5\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u52a0\u4e0a <code class=\"literal\">_fsm</code> \u540e\u7f00\u547d\u540d\u7684\u6587\u4ef6\u4e2d\u3002\u8868\u8fd8\u62e5\u6709<em class=\"firstterm\">\u53ef\u89c1\u6027\u6620\u5c04</em>\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_vm</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff0c\u7528\u4e8e\u8ddf\u8e2a\u54ea\u4e9b\u9875\u9762\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u3002\u53ef\u89c1\u6027\u6620\u5c04\u5728<a class=\"xref\" href=\"/docs/17/storage-vm.html\" title=\"65.4.\u00a0\u53ef\u89c1\u6027\u6620\u5c04\">\u7b2c\u00a065.4\u00a0\u8282</a>\u4e2d\u6709\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u652f\uff0c\u79f0\u4e3a\u521d\u59cb\u5316\u5206\u652f\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_init</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff08\u89c1<a class=\"xref\" href=\"/docs/17/storage-init.html\" title=\"65.5.\u00a0\u521d\u59cb\u5316\u5206\u652f\">\u7b2c\u00a065.5\u00a0\u8282</a>\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u4e00\u4e2a\u8868\u5305\u542b\u53ef\u80fd\u5177\u6709\u5f88\u5927\u6761\u76ee\u7684\u5217\uff0c\u5b83\u5c31\u4f1a\u6709\u5173\u8054\u7684 <em class=\"firstterm\">TOAST</em> \u8868\uff0c\u7528\u4e8e\u5bf9\u90a3\u4e9b\u5927\u5230\u65e0\u6cd5\u76f4\u63a5\u4fdd\u5b58\u5728\u8868\u884c\u4e2d\u7684\u5b57\u6bb5\u503c\u8fdb\u884c\u884c\u5916\u5b58\u50a8\u3002<code class=\"structname\">pg_class</code>.<code class=\"structfield\">reltoastrelid</code> \u4f1a\u628a\u8be5\u8868\u5173\u8054\u5230\u5176 <acronym class=\"acronym\">TOAST</acronym> \u8868\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\u3002\u66f4\u591a\u4fe1\u606f\u89c1<a class=\"xref\" href=\"/docs/17/storage-toast.html\" title=\"65.2.\u00a0TOAST\">\u7b2c\u00a065.2\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u8868\u548c\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728<a class=\"xref\" href=\"/docs/17/storage-page-layout.html\" title=\"65.6.\u00a0\u6570\u636e\u5e93\u9875\u9762\u5e03\u5c40\">\u7b2c\u00a065.6\u00a0\u8282</a>\u4e2d\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/17/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/storage-file-layout.html", "method": "same-major semantic node", "sha256": "560012604ef3e72433d00f8d7c10e196fc8d62ce42f886a6d72b9471e74a6257", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[0]", "#STORAGE-FILE-LAYOUT/div[4]/p[0]", "#STORAGE-FILE-LAYOUT/div[9]/h3[0]", "#STORAGE-FILE-LAYOUT/p[11]", "#STORAGE-FILE-LAYOUT/p[12]", "#STORAGE-FILE-LAYOUT/p[3]", "#STORAGE-FILE-LAYOUT/p[8]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "This section describes the storage format at the level of files and directories.", "/versions/17/facts/0/label": "Definition scope", "/versions/17/facts/0/value": "Same-version core physical storage documentation", "/versions/17/tables/0/title": "Contents of PGDATA", "/versions/17/related/1/label": "Storage Parameters", "/versions/17/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/17/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/17/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/17/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/17/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/17/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/17/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/17/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/17/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/17/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/17/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/17/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/17/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/17/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/17/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/17/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/17/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/17/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/17/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/17/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/17/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/17/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/17/tables/0/columns/0/label": "Item", "/versions/17/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "2af3b360786f83d7ee46c2a021ccc45085381905453d272ce4ec977018120c94"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "18": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=18", "label": "Table AM"}, {"url": "/wiki/relopts/?v=18", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 18 English manual", "sha256": "8cdf46b5af669f41f0a77c2541863d63454ef8fbb44d22a75e576cf1a7efc9c9", "language": "en", "original_url": "/docs/18/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">66.1.\u00a0\u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40 </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">PGDATA</code> \u76ee\u5f55\u5305\u542b\u82e5\u5e72\u5b50\u76ee\u5f55\u548c\u63a7\u5236\u6587\u4ef6\uff0c\u5982<a class=\"xref\" href=\"/docs/18/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"\u8868\u00a066.1.\u00a0PGDATA \u7684\u5185\u5bb9\">\u8868\u00a066.1</a>\u6240\u793a\u3002\u9664\u8fd9\u4e9b\u5fc5\u9700\u9879\u4e4b\u5916\uff0c\u96c6\u7c07\u914d\u7f6e\u6587\u4ef6 <code class=\"filename\">postgresql.conf</code>\u3001<code class=\"filename\">pg_hba.conf</code> \u548c <code class=\"filename\">pg_ident.conf</code> \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u5728 <code class=\"varname\">PGDATA</code> \u4e2d\uff0c\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u628a\u5b83\u4eec\u653e\u5728\u5176\u4ed6\u5730\u65b9\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.1.\u00a0<code class=\"varname\">PGDATA</code> \u7684\u5185\u5bb9</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u5bf9\u4e8e\u666e\u901a\u5173\u7cfb\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4ee5\u8868\u6216\u7d22\u5f15\u7684<em class=\"firstterm\">\u6587\u4ef6\u8282\u70b9</em>\u7f16\u53f7\u547d\u540d\uff0c\u8be5\u7f16\u53f7\u53ef\u5728 <code class=\"structname\">pg_class</code>.<code class=\"structfield\">relfilenode</code> \u4e2d\u627e\u5230\u3002\u4f46\u5bf9\u4e8e\u4e34\u65f6\u5173\u7cfb\uff0c\u6587\u4ef6\u540d\u7684\u5f62\u5f0f\u4e3a <code class=\"literal\">t<em class=\"replaceable\"><code>BBB</code></em>_<em class=\"replaceable\"><code>FFF</code></em></code>\uff0c\u5176\u4e2d <em class=\"replaceable\"><code>BBB</code></em> \u662f\u521b\u5efa\u8be5\u6587\u4ef6\u7684\u540e\u7aef\u8fdb\u7a0b\u53f7\uff0c<em class=\"replaceable\"><code>FFF</code></em> \u662f\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u3002\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u9664\u4e86\u4e3b\u6587\u4ef6\uff08\u4e5f\u79f0\u4e3b\u5206\u652f\uff09\u4e4b\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a<em class=\"firstterm\">\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04</em>\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-fsm.html\" title=\"66.3.\u00a0\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\">\u7b2c\u00a066.3\u00a0\u8282</a>\uff09\uff0c\u7528\u4e8e\u5b58\u50a8\u8be5\u5173\u7cfb\u53ef\u7528\u7a7a\u95f2\u7a7a\u95f4\u7684\u4fe1\u606f\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u5b58\u653e\u5728\u4ee5\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u52a0\u4e0a <code class=\"literal\">_fsm</code> \u540e\u7f00\u547d\u540d\u7684\u6587\u4ef6\u4e2d\u3002\u8868\u8fd8\u62e5\u6709<em class=\"firstterm\">\u53ef\u89c1\u6027\u6620\u5c04</em>\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_vm</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff0c\u7528\u4e8e\u8ddf\u8e2a\u54ea\u4e9b\u9875\u9762\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u3002\u53ef\u89c1\u6027\u6620\u5c04\u5728<a class=\"xref\" href=\"/docs/18/storage-vm.html\" title=\"66.4.\u00a0\u53ef\u89c1\u6027\u6620\u5c04\">\u7b2c\u00a066.4\u00a0\u8282</a>\u4e2d\u6709\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u652f\uff0c\u79f0\u4e3a\u521d\u59cb\u5316\u5206\u652f\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_init</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-init.html\" title=\"66.5.\u00a0\u521d\u59cb\u5316\u5206\u652f\">\u7b2c\u00a066.5\u00a0\u8282</a>\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u4e00\u4e2a\u8868\u5305\u542b\u53ef\u80fd\u5177\u6709\u5f88\u5927\u6761\u76ee\u7684\u5217\uff0c\u5b83\u5c31\u4f1a\u6709\u5173\u8054\u7684 <em class=\"firstterm\">TOAST</em> \u8868\uff0c\u7528\u4e8e\u5bf9\u90a3\u4e9b\u5927\u5230\u65e0\u6cd5\u76f4\u63a5\u4fdd\u5b58\u5728\u8868\u884c\u4e2d\u7684\u5b57\u6bb5\u503c\u8fdb\u884c\u884c\u5916\u5b58\u50a8\u3002<code class=\"structname\">pg_class</code>.<code class=\"structfield\">reltoastrelid</code> \u4f1a\u628a\u8be5\u8868\u5173\u8054\u5230\u5176 <acronym class=\"acronym\">TOAST</acronym> \u8868\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\u3002\u66f4\u591a\u4fe1\u606f\u89c1<a class=\"xref\" href=\"/docs/18/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u8868\u548c\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728<a class=\"xref\" href=\"/docs/18/storage-page-layout.html\" title=\"66.6.\u00a0\u6570\u636e\u5e93\u9875\u9762\u5e03\u5c40\">\u7b2c\u00a066.6\u00a0\u8282</a>\u4e2d\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/18/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/storage-file-layout.html", "method": "same-major semantic node", "sha256": "55056edf7352b4e414c1366406a307a72af33aeda7854ef3a8cc1fa5c0db23ad", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[0]", "#STORAGE-FILE-LAYOUT/div[4]/p[0]", "#STORAGE-FILE-LAYOUT/div[9]/h3[0]", "#STORAGE-FILE-LAYOUT/p[11]", "#STORAGE-FILE-LAYOUT/p[12]", "#STORAGE-FILE-LAYOUT/p[3]", "#STORAGE-FILE-LAYOUT/p[8]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "This section describes the storage format at the level of files and directories.", "/versions/18/facts/0/label": "Definition scope", "/versions/18/facts/0/value": "Same-version core physical storage documentation", "/versions/18/tables/0/title": "Contents of PGDATA", "/versions/18/related/1/label": "Storage Parameters", "/versions/18/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/18/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/18/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/18/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/18/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/18/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/18/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/18/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/18/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/18/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/18/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/18/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/18/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/18/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/18/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/18/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/18/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/18/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/18/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/18/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/18/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/18/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/18/tables/0/columns/0/label": "Item", "/versions/18/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "8685c87dcbc9ef532d5f89e4db5917ae183ee72e37dbdbcd5f3d0dc01f7a5ad4"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "19": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=19", "label": "Table AM"}, {"url": "/wiki/relopts/?v=19", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "https://pg.center/docs/19/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 19 English manual", "sha256": "64a2fe5f641ad71ef53151e63f4eab9f74fcedd6cde5ed49c6b1dac837c2ee2f", "language": "en", "original_url": "/docs/19/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">66.1.\u00a0\u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40 </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">PGDATA</code> \u76ee\u5f55\u5305\u542b\u82e5\u5e72\u5b50\u76ee\u5f55\u548c\u63a7\u5236\u6587\u4ef6\uff0c\u5982<a class=\"xref\" href=\"/docs/19/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"\u8868\u00a066.1.\u00a0PGDATA \u7684\u5185\u5bb9\">\u8868\u00a066.1</a>\u6240\u793a\u3002\u9664\u8fd9\u4e9b\u5fc5\u9700\u9879\u4e4b\u5916\uff0c\u96c6\u7c07\u914d\u7f6e\u6587\u4ef6 <code class=\"filename\">postgresql.conf</code>\u3001<code class=\"filename\">pg_hba.conf</code> \u548c <code class=\"filename\">pg_ident.conf</code> \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u5728 <code class=\"varname\">PGDATA</code> \u4e2d\uff0c\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u628a\u5b83\u4eec\u653e\u5728\u5176\u4ed6\u5730\u65b9\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.1.\u00a0<code class=\"varname\">PGDATA</code> \u7684\u5185\u5bb9</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u5bf9\u4e8e\u666e\u901a\u5173\u7cfb\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4ee5\u8868\u6216\u7d22\u5f15\u7684<em class=\"firstterm\">\u6587\u4ef6\u8282\u70b9</em>\u7f16\u53f7\u547d\u540d\uff0c\u8be5\u7f16\u53f7\u53ef\u5728 <code class=\"structname\">pg_class</code>.<code class=\"structfield\">relfilenode</code> \u4e2d\u627e\u5230\u3002\u4f46\u5bf9\u4e8e\u4e34\u65f6\u5173\u7cfb\uff0c\u6587\u4ef6\u540d\u7684\u5f62\u5f0f\u4e3a <code class=\"literal\">t<em class=\"replaceable\"><code>BBB</code></em>_<em class=\"replaceable\"><code>FFF</code></em></code>\uff0c\u5176\u4e2d <em class=\"replaceable\"><code>BBB</code></em> \u662f\u521b\u5efa\u8be5\u6587\u4ef6\u7684\u540e\u7aef\u8fdb\u7a0b\u53f7\uff0c<em class=\"replaceable\"><code>FFF</code></em> \u662f\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u3002\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u9664\u4e86\u4e3b\u6587\u4ef6\uff08\u4e5f\u79f0\u4e3b\u5206\u652f\uff09\u4e4b\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a<em class=\"firstterm\">\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04</em>\uff08\u89c1<a class=\"xref\" href=\"/docs/19/storage-fsm.html\" title=\"66.3.\u00a0\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\">\u7b2c\u00a066.3\u00a0\u8282</a>\uff09\uff0c\u7528\u4e8e\u5b58\u50a8\u8be5\u5173\u7cfb\u53ef\u7528\u7a7a\u95f2\u7a7a\u95f4\u7684\u4fe1\u606f\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u5b58\u653e\u5728\u4ee5\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u52a0\u4e0a <code class=\"literal\">_fsm</code> \u540e\u7f00\u547d\u540d\u7684\u6587\u4ef6\u4e2d\u3002\u8868\u8fd8\u62e5\u6709<em class=\"firstterm\">\u53ef\u89c1\u6027\u6620\u5c04</em>\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_vm</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff0c\u7528\u4e8e\u8ddf\u8e2a\u54ea\u4e9b\u9875\u9762\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u3002\u53ef\u89c1\u6027\u6620\u5c04\u5728<a class=\"xref\" href=\"/docs/19/storage-vm.html\" title=\"66.4.\u00a0\u53ef\u89c1\u6027\u6620\u5c04\">\u7b2c\u00a066.4\u00a0\u8282</a>\u4e2d\u6709\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u652f\uff0c\u79f0\u4e3a\u521d\u59cb\u5316\u5206\u652f\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_init</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff08\u89c1<a class=\"xref\" href=\"/docs/19/storage-init.html\" title=\"66.5.\u00a0\u521d\u59cb\u5316\u5206\u652f\">\u7b2c\u00a066.5\u00a0\u8282</a>\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u4e00\u4e2a\u8868\u5305\u542b\u53ef\u80fd\u5177\u6709\u5f88\u5927\u6761\u76ee\u7684\u5217\uff0c\u5b83\u5c31\u4f1a\u6709\u5173\u8054\u7684 <em class=\"firstterm\">TOAST</em> \u8868\uff0c\u7528\u4e8e\u5bf9\u90a3\u4e9b\u5927\u5230\u65e0\u6cd5\u76f4\u63a5\u4fdd\u5b58\u5728\u8868\u884c\u4e2d\u7684\u5b57\u6bb5\u503c\u8fdb\u884c\u884c\u5916\u5b58\u50a8\u3002<code class=\"structname\">pg_class</code>.<code class=\"structfield\">reltoastrelid</code> \u4f1a\u628a\u8be5\u8868\u5173\u8054\u5230\u5176 <acronym class=\"acronym\">TOAST</acronym> \u8868\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\u3002\u66f4\u591a\u4fe1\u606f\u89c1<a class=\"xref\" href=\"/docs/19/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u8868\u548c\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728<a class=\"xref\" href=\"/docs/19/storage-page-layout.html\" title=\"66.6.\u00a0\u6570\u636e\u5e93\u9875\u9762\u5e03\u5c40\">\u7b2c\u00a066.6\u00a0\u8282</a>\u4e2d\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/19/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/storage-file-layout.html", "method": "same-major semantic node", "sha256": "9a13b1f05755a7031d551a429c6d21bff35d965f098909408a39259ca751f156", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[0]", "#STORAGE-FILE-LAYOUT/div[4]/p[0]", "#STORAGE-FILE-LAYOUT/div[9]/h3[0]", "#STORAGE-FILE-LAYOUT/p[11]", "#STORAGE-FILE-LAYOUT/p[12]", "#STORAGE-FILE-LAYOUT/p[3]", "#STORAGE-FILE-LAYOUT/p[8]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "This section describes the storage format at the level of files and directories.", "/versions/19/facts/0/label": "Definition scope", "/versions/19/facts/0/value": "Same-version core physical storage documentation", "/versions/19/tables/0/title": "Contents of PGDATA", "/versions/19/related/1/label": "Storage Parameters", "/versions/19/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/19/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/19/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/19/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/19/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/19/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/19/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/19/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/19/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/19/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/19/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/19/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/19/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/19/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/19/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/19/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/19/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/19/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/19/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/19/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/19/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/19/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/19/tables/0/columns/0/label": "Item", "/versions/19/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "18bf7a726c60309d9916f6b07efec402396578129542a10e620cfcb3371335ea"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "20": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=20", "label": "Table AM"}, {"url": "/wiki/relopts/?v=20", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "https://pg.center/docs/devel/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 20 English manual", "sha256": "d6da97aa52fb525d5de5423d7993a2e42e7675a469110d0753f96dc8a66be1b0", "language": "en", "original_url": "/docs/devel/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">66.1.\u00a0\u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40 </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">PGDATA</code> \u76ee\u5f55\u5305\u542b\u82e5\u5e72\u5b50\u76ee\u5f55\u548c\u63a7\u5236\u6587\u4ef6\uff0c\u5982<a class=\"xref\" href=\"/docs/devel/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"\u8868\u00a066.1.\u00a0PGDATA \u7684\u5185\u5bb9\">\u8868\u00a066.1</a>\u6240\u793a\u3002\u9664\u8fd9\u4e9b\u5fc5\u9700\u9879\u4e4b\u5916\uff0c\u96c6\u7c07\u914d\u7f6e\u6587\u4ef6 <code class=\"filename\">postgresql.conf</code>\u3001<code class=\"filename\">pg_hba.conf</code> \u548c <code class=\"filename\">pg_ident.conf</code> \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u5728 <code class=\"varname\">PGDATA</code> \u4e2d\uff0c\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u628a\u5b83\u4eec\u653e\u5728\u5176\u4ed6\u5730\u65b9\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.1.\u00a0<code class=\"varname\">PGDATA</code> \u7684\u5185\u5bb9</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u5bf9\u4e8e\u666e\u901a\u5173\u7cfb\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4ee5\u8868\u6216\u7d22\u5f15\u7684<em class=\"firstterm\">\u6587\u4ef6\u8282\u70b9</em>\u7f16\u53f7\u547d\u540d\uff0c\u8be5\u7f16\u53f7\u53ef\u5728 <code class=\"structname\">pg_class</code>.<code class=\"structfield\">relfilenode</code> \u4e2d\u627e\u5230\u3002\u4f46\u5bf9\u4e8e\u4e34\u65f6\u5173\u7cfb\uff0c\u6587\u4ef6\u540d\u7684\u5f62\u5f0f\u4e3a <code class=\"literal\">t<em class=\"replaceable\"><code>BBB</code></em>_<em class=\"replaceable\"><code>FFF</code></em></code>\uff0c\u5176\u4e2d <em class=\"replaceable\"><code>BBB</code></em> \u662f\u521b\u5efa\u8be5\u6587\u4ef6\u7684\u540e\u7aef\u8fdb\u7a0b\u53f7\uff0c<em class=\"replaceable\"><code>FFF</code></em> \u662f\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u3002\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u9664\u4e86\u4e3b\u6587\u4ef6\uff08\u4e5f\u79f0\u4e3b\u5206\u652f\uff09\u4e4b\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a<em class=\"firstterm\">\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04</em>\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/storage-fsm.html\" title=\"66.3.\u00a0\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\">\u7b2c\u00a066.3\u00a0\u8282</a>\uff09\uff0c\u7528\u4e8e\u5b58\u50a8\u8be5\u5173\u7cfb\u53ef\u7528\u7a7a\u95f2\u7a7a\u95f4\u7684\u4fe1\u606f\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u5b58\u653e\u5728\u4ee5\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u52a0\u4e0a <code class=\"literal\">_fsm</code> \u540e\u7f00\u547d\u540d\u7684\u6587\u4ef6\u4e2d\u3002\u8868\u8fd8\u62e5\u6709<em class=\"firstterm\">\u53ef\u89c1\u6027\u6620\u5c04</em>\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_vm</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff0c\u7528\u4e8e\u8ddf\u8e2a\u54ea\u4e9b\u9875\u9762\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u3002\u53ef\u89c1\u6027\u6620\u5c04\u5728<a class=\"xref\" href=\"/docs/devel/storage-vm.html\" title=\"66.4.\u00a0\u53ef\u89c1\u6027\u6620\u5c04\">\u7b2c\u00a066.4\u00a0\u8282</a>\u4e2d\u6709\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u652f\uff0c\u79f0\u4e3a\u521d\u59cb\u5316\u5206\u652f\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_init</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/storage-init.html\" title=\"66.5.\u00a0\u521d\u59cb\u5316\u5206\u652f\">\u7b2c\u00a066.5\u00a0\u8282</a>\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u4e00\u4e2a\u8868\u5305\u542b\u53ef\u80fd\u5177\u6709\u5f88\u5927\u6761\u76ee\u7684\u5217\uff0c\u5b83\u5c31\u4f1a\u6709\u5173\u8054\u7684 <em class=\"firstterm\">TOAST</em> \u8868\uff0c\u7528\u4e8e\u5bf9\u90a3\u4e9b\u5927\u5230\u65e0\u6cd5\u76f4\u63a5\u4fdd\u5b58\u5728\u8868\u884c\u4e2d\u7684\u5b57\u6bb5\u503c\u8fdb\u884c\u884c\u5916\u5b58\u50a8\u3002<code class=\"structname\">pg_class</code>.<code class=\"structfield\">reltoastrelid</code> \u4f1a\u628a\u8be5\u8868\u5173\u8054\u5230\u5176 <acronym class=\"acronym\">TOAST</acronym> \u8868\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\u3002\u66f4\u591a\u4fe1\u606f\u89c1<a class=\"xref\" href=\"/docs/devel/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u8868\u548c\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728<a class=\"xref\" href=\"/docs/devel/storage-page-layout.html\" title=\"66.6.\u00a0\u6570\u636e\u5e93\u9875\u9762\u5e03\u5c40\">\u7b2c\u00a066.6\u00a0\u8282</a>\u4e2d\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/devel/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/storage-file-layout.html", "method": "same-major semantic node", "sha256": "b9b6648fd2b429a3ecdd8415a850a0a45442ec89c62b4df06cbd7805b21a9363", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[0]", "#STORAGE-FILE-LAYOUT/div[4]/p[0]", "#STORAGE-FILE-LAYOUT/div[9]/h3[0]", "#STORAGE-FILE-LAYOUT/p[11]", "#STORAGE-FILE-LAYOUT/p[12]", "#STORAGE-FILE-LAYOUT/p[3]", "#STORAGE-FILE-LAYOUT/p[8]"]}], "language": "zh", "original_text": {"/summary": "This section describes the storage format at the level of files and directories.", "/category": "Physical structures", "/versions/20/description/0": "This section describes the storage format at the level of files and directories.", "/versions/20/facts/0/label": "Definition scope", "/versions/20/facts/0/value": "Same-version core physical storage documentation", "/versions/20/tables/0/title": "Contents of PGDATA", "/versions/20/related/1/label": "Storage Parameters", "/versions/20/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/20/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/20/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/20/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/20/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/20/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/20/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/20/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/20/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/20/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/20/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/20/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/20/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/20/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/20/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/20/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/20/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/20/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/20/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/20/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/20/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/20/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/20/tables/0/columns/0/label": "Item", "/versions/20/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "3b6b0f9563eb71edb2b3febaa53c8879b8f604a2fa5eb2b2c1e3ad0819f6f31a"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}}}, "snapshot": {"facts": [{"label": "\u5b9a\u4e49\u8303\u56f4", "value": "\u540c\u7248\u672c\u6838\u5fc3\u7269\u7406\u5b58\u50a8\u6587\u6863"}], "tables": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6"}, {"c0": "base", "c1": "\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55"}, {"c0": "current_logfiles", "c1": "\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6"}, {"c0": "global", "c1": "\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_commit_ts", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_dynshmem", "c1": "\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_logical", "c1": "\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_multixact", "c1": "\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501"}, {"c0": "pg_notify", "c1": "\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_replslot", "c1": "\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_serial", "c1": "\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_snapshots", "c1": "\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_stat_tmp", "c1": "\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_subtrans", "c1": "\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_tblspc", "c1": "\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_twophase", "c1": "\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_wal", "c1": "\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55"}, {"c0": "pg_xact", "c1": "\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55"}, {"c0": "postgresql.auto.conf", "c1": "\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6"}, {"c0": "postmaster.opts", "c1": "\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6"}, {"c0": "postmaster.pid", "c1": "\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002"}], "title": "PGDATA \u5185\u5bb9", "columns": [{"key": "c0", "label": "\u9879\u76ee"}, {"key": "c1", "label": "\u8bf4\u660e"}]}], "related": [{"url": "/wiki/tableam/?v=18", "label": "Table AM"}, {"url": "/wiki/relopts/?v=18", "label": "\u5b58\u50a8\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/storage-file-layout.html", "path": "storage-file-layout.html", "label": "PostgreSQL 18 English manual", "sha256": "8cdf46b5af669f41f0a77c2541863d63454ef8fbb44d22a75e576cf1a7efc9c9", "language": "en", "original_url": "/docs/18/storage-file-layout.html"}], "sections": [], "signature": "", "description": ["\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002"], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">66.1.\u00a0\u6570\u636e\u5e93\u6587\u4ef6\u5e03\u5c40 </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u672c\u8282\u4ece\u6587\u4ef6\u4e0e\u76ee\u5f55\u5c42\u9762\u63cf\u8ff0\u5b58\u50a8\u683c\u5f0f\u3002</p>\n<p lang=\"zh\">\u4f20\u7edf\u4e0a\uff0c\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u6587\u4ef6\u4e00\u540c\u5b58\u653e\u5728\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u4e2d\u3002\u8be5\u76ee\u5f55\u901a\u5e38\u79f0\u4e3a PGDATA\uff0c\u540d\u79f0\u6765\u81ea\u53ef\u7528\u4e8e\u6307\u5b9a\u5b83\u7684\u73af\u5883\u53d8\u91cf\uff1b\u5e38\u89c1\u4f4d\u7f6e\u4e3a /var/lib/pgsql/data\u3002\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u4ee5\u5b58\u5728\u591a\u4e2a\u7531\u4e0d\u540c\u670d\u52a1\u5668\u5b9e\u4f8b\u7ba1\u7406\u7684\u96c6\u7fa4\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">PGDATA</code> \u76ee\u5f55\u5305\u542b\u82e5\u5e72\u5b50\u76ee\u5f55\u548c\u63a7\u5236\u6587\u4ef6\uff0c\u5982<a class=\"xref\" href=\"/docs/18/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"\u8868\u00a066.1.\u00a0PGDATA \u7684\u5185\u5bb9\">\u8868\u00a066.1</a>\u6240\u793a\u3002\u9664\u8fd9\u4e9b\u5fc5\u9700\u9879\u4e4b\u5916\uff0c\u96c6\u7c07\u914d\u7f6e\u6587\u4ef6 <code class=\"filename\">postgresql.conf</code>\u3001<code class=\"filename\">pg_hba.conf</code> \u548c <code class=\"filename\">pg_ident.conf</code> \u4f20\u7edf\u4e0a\u4e5f\u5b58\u653e\u5728 <code class=\"varname\">PGDATA</code> \u4e2d\uff0c\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u628a\u5b83\u4eec\u653e\u5728\u5176\u4ed6\u5730\u65b9\u3002</p>\n<div class=\"table\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a066.1.\u00a0<code class=\"varname\">PGDATA</code> \u7684\u5185\u5bb9</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u9879\u76ee</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"filename\">PG_VERSION</code></td>\n<td lang=\"zh\">\u5305\u542b PostgreSQL \u5927\u7248\u672c\u53f7\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">base</code></td>\n<td lang=\"zh\">\u5305\u542b\u5404\u6570\u636e\u5e93\u5b50\u76ee\u5f55\u7684\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">current_logfiles</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u65e5\u5fd7\u6536\u96c6\u5668\u5f53\u524d\u6b63\u5728\u5199\u5165\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">global</code></td>\n<td lang=\"zh\">\u5305\u542b\u96c6\u7fa4\u7ea7\u8868\uff08\u5982 pg_database\uff09\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_commit_ts</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u65f6\u95f4\u6233\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_dynshmem</code></td>\n<td lang=\"zh\">\u5305\u542b\u52a8\u6001\u5171\u4eab\u5185\u5b58\u5b50\u7cfb\u7edf\u6240\u7528\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_logical</code></td>\n<td lang=\"zh\">\u5305\u542b\u903b\u8f91\u89e3\u7801\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_multixact</code></td>\n<td lang=\"zh\">\u5305\u542b\u591a\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55\uff0c\u7528\u4e8e\u5171\u4eab\u884c\u9501</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_notify</code></td>\n<td lang=\"zh\">\u5305\u542b LISTEN/NOTIFY \u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_replslot</code></td>\n<td lang=\"zh\">\u5305\u542b\u590d\u5236\u69fd\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_serial</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u63d0\u4ea4\u7684\u53ef\u4e32\u884c\u5316\u4e8b\u52a1\u4fe1\u606f\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_snapshots</code></td>\n<td lang=\"zh\">\u5305\u542b\u5df2\u5bfc\u51fa\u5feb\u7167\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u6301\u4e45\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_stat_tmp</code></td>\n<td lang=\"zh\">\u5305\u542b\u7edf\u8ba1\u5b50\u7cfb\u7edf\u4e34\u65f6\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_subtrans</code></td>\n<td lang=\"zh\">\u5305\u542b\u5b50\u4e8b\u52a1\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_tblspc</code></td>\n<td lang=\"zh\">\u5305\u542b\u6307\u5411\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_twophase</code></td>\n<td lang=\"zh\">\u5305\u542b\u9884\u5907\u4e8b\u52a1\u72b6\u6001\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_wal</code></td>\n<td lang=\"zh\">\u5305\u542b WAL\uff08\u9884\u5199\u5f0f\u65e5\u5fd7\uff09\u6587\u4ef6\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">pg_xact</code></td>\n<td lang=\"zh\">\u5305\u542b\u4e8b\u52a1\u63d0\u4ea4\u72b6\u6001\u6570\u636e\u7684\u5b50\u76ee\u5f55</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postgresql.auto.conf</code></td>\n<td lang=\"zh\">\u5b58\u50a8\u7531 ALTER SYSTEM \u8bbe\u7f6e\u7684\u914d\u7f6e\u53c2\u6570\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.opts</code></td>\n<td lang=\"zh\">\u8bb0\u5f55\u670d\u52a1\u5668\u4e0a\u6b21\u542f\u52a8\u6240\u7528\u547d\u4ee4\u884c\u9009\u9879\u7684\u6587\u4ef6</td>\n</tr>\n<tr>\n<td><code class=\"filename\">postmaster.pid</code></td>\n<td lang=\"zh\">\u9501\u6587\u4ef6\uff0c\u8bb0\u5f55\u5f53\u524d postmaster \u7684\u8fdb\u7a0b ID\uff08PID\uff09\u3001\u96c6\u7fa4\u6570\u636e\u76ee\u5f55\u8def\u5f84\u3001postmaster \u542f\u52a8\u65f6\u95f4\u6233\u3001\u7aef\u53e3\u53f7\u3001Unix \u57df\u5957\u63a5\u5b57\u76ee\u5f55\u8def\u5f84\uff08\u53ef\u80fd\u4e3a\u7a7a\uff09\u3001\u7b2c\u4e00\u4e2a\u6709\u6548\u7684 listen_address\uff08IP \u5730\u5740\u6216 *\uff1b\u672a\u76d1\u542c TCP \u65f6\u4e3a\u7a7a\uff09\u4ee5\u53ca\u5171\u4eab\u5185\u5b58\u6bb5 ID\u3002\u670d\u52a1\u5668\u5173\u95ed\u540e\u6b64\u6587\u4ef6\u4e0d\u5b58\u5728\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n<p lang=\"zh\">\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u6570\u636e\u5e93\u5728 PGDATA/base \u4e0b\u90fd\u6709\u4e00\u4e2a\u5b50\u76ee\u5f55\uff0c\u540d\u79f0\u4e3a\u8be5\u6570\u636e\u5e93\u5728 pg_database \u4e2d\u7684 OID\u3002\u8fd9\u662f\u6570\u636e\u5e93\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b58\u653e\u4f4d\u7f6e\uff0c\u5176\u7cfb\u7edf\u76ee\u5f55\u4e5f\u5b58\u50a8\u4e8e\u6b64\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u5404\u8282\u63cf\u8ff0\u5185\u7f6e heap \u8868\u8bbf\u95ee\u65b9\u6cd5\u4e0e\u5185\u7f6e\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5\u7684\u884c\u4e3a\u3002PostgreSQL \u5177\u6709\u53ef\u6269\u5c55\u6027\uff0c\u5176\u4ed6\u8bbf\u95ee\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u53ef\u80fd\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u90fd\u5b58\u50a8\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u5bf9\u4e8e\u666e\u901a\u5173\u7cfb\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4ee5\u8868\u6216\u7d22\u5f15\u7684<em class=\"firstterm\">\u6587\u4ef6\u8282\u70b9</em>\u7f16\u53f7\u547d\u540d\uff0c\u8be5\u7f16\u53f7\u53ef\u5728 <code class=\"structname\">pg_class</code>.<code class=\"structfield\">relfilenode</code> \u4e2d\u627e\u5230\u3002\u4f46\u5bf9\u4e8e\u4e34\u65f6\u5173\u7cfb\uff0c\u6587\u4ef6\u540d\u7684\u5f62\u5f0f\u4e3a <code class=\"literal\">t<em class=\"replaceable\"><code>BBB</code></em>_<em class=\"replaceable\"><code>FFF</code></em></code>\uff0c\u5176\u4e2d <em class=\"replaceable\"><code>BBB</code></em> \u662f\u521b\u5efa\u8be5\u6587\u4ef6\u7684\u540e\u7aef\u8fdb\u7a0b\u53f7\uff0c<em class=\"replaceable\"><code>FFF</code></em> \u662f\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u3002\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u9664\u4e86\u4e3b\u6587\u4ef6\uff08\u4e5f\u79f0\u4e3b\u5206\u652f\uff09\u4e4b\u5916\uff0c\u6bcf\u4e2a\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u4e00\u4e2a<em class=\"firstterm\">\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04</em>\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-fsm.html\" title=\"66.3.\u00a0\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\">\u7b2c\u00a066.3\u00a0\u8282</a>\uff09\uff0c\u7528\u4e8e\u5b58\u50a8\u8be5\u5173\u7cfb\u53ef\u7528\u7a7a\u95f2\u7a7a\u95f4\u7684\u4fe1\u606f\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u5b58\u653e\u5728\u4ee5\u6587\u4ef6\u8282\u70b9\u7f16\u53f7\u52a0\u4e0a <code class=\"literal\">_fsm</code> \u540e\u7f00\u547d\u540d\u7684\u6587\u4ef6\u4e2d\u3002\u8868\u8fd8\u62e5\u6709<em class=\"firstterm\">\u53ef\u89c1\u6027\u6620\u5c04</em>\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_vm</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff0c\u7528\u4e8e\u8ddf\u8e2a\u54ea\u4e9b\u9875\u9762\u5df2\u77e5\u4e0d\u542b\u6b7b\u5143\u7ec4\u3002\u53ef\u89c1\u6027\u6620\u5c04\u5728<a class=\"xref\" href=\"/docs/18/storage-vm.html\" title=\"66.4.\u00a0\u53ef\u89c1\u6027\u6620\u5c04\">\u7b2c\u00a066.4\u00a0\u8282</a>\u4e2d\u6709\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u548c\u7d22\u5f15\u8fd8\u6709\u7b2c\u4e09\u4e2a\u5206\u652f\uff0c\u79f0\u4e3a\u521d\u59cb\u5316\u5206\u652f\uff0c\u5b58\u653e\u5728\u5e26\u6709 <code class=\"literal\">_init</code> \u540e\u7f00\u7684\u5206\u652f\u4e2d\uff08\u89c1<a class=\"xref\" href=\"/docs/18/storage-init.html\" title=\"66.5.\u00a0\u521d\u59cb\u5316\u5206\u652f\">\u7b2c\u00a066.5\u00a0\u8282</a>\uff09\u3002</p>\n<div class=\"caution\">\n<h3 class=\"title\" lang=\"zh\">\u5c0f\u5fc3</h3>\n<p lang=\"zh\">\u8868\u7684 filenode \u901a\u5e38\u4e0e\u5176 OID \u76f8\u540c\uff0c\u4f46\u5e76\u975e\u603b\u662f\u5982\u6b64\u3002TRUNCATE\u3001REINDEX\u3001CLUSTER \u53ca\u67d0\u4e9b\u5f62\u5f0f\u7684 ALTER TABLE \u7b49\u64cd\u4f5c\u4f1a\u6539\u53d8 filenode \u800c\u4fdd\u7559 OID\uff0c\u56e0\u6b64\u4e0d\u80fd\u5047\u8bbe\u4e8c\u8005\u76f8\u540c\u3002\u6b64\u5916\uff0c\u5305\u62ec pg_class \u81ea\u8eab\u5728\u5185\u7684\u67d0\u4e9b\u7cfb\u7edf\u76ee\u5f55\uff0c\u5176 pg_class.relfilenode \u4e3a\u96f6\uff1b\u5b9e\u9645 filenode \u7f16\u53f7\u5b58\u50a8\u5728\u66f4\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u4e2d\uff0c\u53ef\u901a\u8fc7 pg_relation_filenode() \u83b7\u53d6\u3002</p>\n</div>\n<p lang=\"zh\">\u8868\u6216\u7d22\u5f15\u8d85\u8fc7 1 GB \u65f6\uff0c\u4f1a\u62c6\u5206\u4e3a\u4ee5 GB \u4e3a\u5355\u4f4d\u7684\u5206\u6bb5\u3002\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\u4e0e filenode \u76f8\u540c\uff0c\u4e4b\u540e\u4f9d\u6b21\u4e3a filenode.1\u3001filenode.2 \u7b49\u3002\u8fd9\u53ef\u907f\u514d\u67d0\u4e9b\u5e73\u53f0\u7684\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u30021 GB \u53ea\u662f\u9ed8\u8ba4\u5206\u6bb5\u5927\u5c0f\uff0c\u53ef\u5728\u7f16\u8bd1 PostgreSQL \u65f6\u901a\u8fc7 --with-segsize \u914d\u7f6e\u9009\u9879\u8c03\u6574\u3002\u7a7a\u95f2\u7a7a\u95f4\u6620\u5c04\u548c\u53ef\u89c1\u6027\u6620\u5c04\u5206\u53c9\u539f\u5219\u4e0a\u4e5f\u53ef\u80fd\u9700\u8981\u591a\u4e2a\u5206\u6bb5\uff0c\u4f46\u5b9e\u8df5\u4e2d\u5f88\u5c11\u53d1\u751f\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u4e00\u4e2a\u8868\u5305\u542b\u53ef\u80fd\u5177\u6709\u5f88\u5927\u6761\u76ee\u7684\u5217\uff0c\u5b83\u5c31\u4f1a\u6709\u5173\u8054\u7684 <em class=\"firstterm\">TOAST</em> \u8868\uff0c\u7528\u4e8e\u5bf9\u90a3\u4e9b\u5927\u5230\u65e0\u6cd5\u76f4\u63a5\u4fdd\u5b58\u5728\u8868\u884c\u4e2d\u7684\u5b57\u6bb5\u503c\u8fdb\u884c\u884c\u5916\u5b58\u50a8\u3002<code class=\"structname\">pg_class</code>.<code class=\"structfield\">reltoastrelid</code> \u4f1a\u628a\u8be5\u8868\u5173\u8054\u5230\u5176 <acronym class=\"acronym\">TOAST</acronym> \u8868\uff08\u5982\u679c\u5b58\u5728\u7684\u8bdd\uff09\u3002\u66f4\u591a\u4fe1\u606f\u89c1<a class=\"xref\" href=\"/docs/18/storage-toast.html\" title=\"66.2.\u00a0TOAST\">\u7b2c\u00a066.2\u00a0\u8282</a>\u3002</p>\n<p lang=\"zh\">\u8868\u548c\u7d22\u5f15\u7684\u5185\u5bb9\u5c06\u5728<a class=\"xref\" href=\"/docs/18/storage-page-layout.html\" title=\"66.6.\u00a0\u6570\u636e\u5e93\u9875\u9762\u5e03\u5c40\">\u7b2c\u00a066.6\u00a0\u8282</a>\u4e2d\u8fdb\u4e00\u6b65\u8ba8\u8bba\u3002</p>\n<p lang=\"zh\">\u8868\u7a7a\u95f4\u4f1a\u4f7f\u4e0a\u8ff0\u60c5\u51b5\u66f4\u590d\u6742\u3002\u6bcf\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u8868\u7a7a\u95f4\u90fd\u5728 PGDATA/pg_tblspc \u4e0b\u6709\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\uff0c\u6307\u5411\u5b9e\u9645\u8868\u7a7a\u95f4\u76ee\u5f55\uff0c\u5373 CREATE TABLESPACE \u4e2d\u6307\u5b9a\u7684\u4f4d\u7f6e\uff0c\u94fe\u63a5\u540d\u4e3a\u8868\u7a7a\u95f4\u7684 OID\u3002\u5b9e\u9645\u76ee\u5f55\u4e2d\u8fd8\u6709\u4e00\u4e2a\u4f9d\u8d56 PostgreSQL \u670d\u52a1\u5668\u7248\u672c\u547d\u540d\u7684\u5b50\u76ee\u5f55\uff0c\u4f8b\u5982 PG_9.0_201008051\uff0c\u4ee5\u4fbf\u4e0d\u540c\u6570\u636e\u5e93\u7248\u672c\u53ef\u4ee5\u5171\u7528\u540c\u4e00\u4e2a CREATE TABLESPACE \u4f4d\u7f6e\u800c\u4e0d\u51b2\u7a81\u3002\u7248\u672c\u5b50\u76ee\u5f55\u4e0b\uff0c\u518d\u4e3a\u6bcf\u4e2a\u5728\u6b64\u8868\u7a7a\u95f4\u4e2d\u5b58\u50a8\u5bf9\u8c61\u7684\u6570\u636e\u5e93\u521b\u5efa\u4ee5\u5176 OID \u547d\u540d\u7684\u5b50\u76ee\u5f55\uff1b\u8868\u548c\u7d22\u5f15\u4f7f\u7528 filenode \u547d\u540d\u65b9\u6848\u5b58\u653e\u4e8e\u6b64\u3002pg_default \u4e0d\u901a\u8fc7 pg_tblspc \u8bbf\u95ee\uff0c\u800c\u662f\u5bf9\u5e94 PGDATA/base\uff1b\u540c\u6837\uff0cpg_global \u5bf9\u5e94 PGDATA/global\u3002</p>\n<p lang=\"zh\">pg_relation_filepath() \u7ed9\u51fa\u4efb\u610f\u5173\u7cfb\u76f8\u5bf9\u4e8e PGDATA \u7684\u5b8c\u6574\u8def\u5f84\uff0c\u901a\u5e38\u53ef\u66ff\u4ee3\u8bb0\u5fc6\u4e0a\u8ff0\u591a\u6761\u89c4\u5219\u3002\u4f46\u8be5\u51fd\u6570\u4ec5\u8fd4\u56de\u5173\u7cfb\u4e3b\u5206\u53c9\u7b2c\u4e00\u4e2a\u5206\u6bb5\u7684\u6587\u4ef6\u540d\uff1b\u8981\u627e\u5230\u8be5\u5173\u7cfb\u7684\u5168\u90e8\u6587\u4ef6\uff0c\u53ef\u80fd\u8fd8\u9700\u8ffd\u52a0\u5206\u6bb5\u53f7\u548c\uff0f\u6216 _fsm\u3001_vm\u3001_init \u540e\u7f00\u3002</p>\n<p lang=\"zh\">\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u6392\u5e8f\u7b49\u65e0\u6cd5\u5b8c\u5168\u653e\u5165\u5185\u5b58\u7684\u64cd\u4f5c\uff0c\u521b\u5efa\u4e8e PGDATA/base/pgsql_tmp\u3002\u5982\u679c\u6307\u5b9a\u4f7f\u7528 pg_default \u4ee5\u5916\u7684\u8868\u7a7a\u95f4\uff0c\u5219\u4f4d\u4e8e\u8be5\u8868\u7a7a\u95f4\u76ee\u5f55\u7684 pgsql_tmp \u5b50\u76ee\u5f55\u4e2d\u3002\u6587\u4ef6\u540d\u5f62\u5982 pgsql_tmpPPP.NNN\uff0cPPP \u4e3a\u6240\u5c5e\u540e\u7aef\u7684 PID\uff0cNNN \u7528\u6765\u533a\u5206\u540c\u4e00\u540e\u7aef\u7684\u4e0d\u540c\u4e34\u65f6\u6587\u4ef6\u3002</p>\n</div>", "manual_path": "/docs/18/storage-file-layout.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/storage-file-layout.html", "method": "same-major semantic node", "sha256": "55056edf7352b4e414c1366406a307a72af33aeda7854ef3a8cc1fa5c0db23ad", "language": "zh", "matched_nodes": ["#STORAGE-FILE-LAYOUT/div[0]", "#STORAGE-FILE-LAYOUT/div[4]/p[0]", "#STORAGE-FILE-LAYOUT/div[9]/h3[0]", "#STORAGE-FILE-LAYOUT/p[11]", "#STORAGE-FILE-LAYOUT/p[12]", "#STORAGE-FILE-LAYOUT/p[3]", "#STORAGE-FILE-LAYOUT/p[8]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "This section describes the storage format at the level of files and directories.", "/versions/18/facts/0/label": "Definition scope", "/versions/18/facts/0/value": "Same-version core physical storage documentation", "/versions/18/tables/0/title": "Contents of PGDATA", "/versions/18/related/1/label": "Storage Parameters", "/versions/18/tables/0/rows/0/c1": "A file containing the major version number of PostgreSQL", "/versions/18/tables/0/rows/1/c1": "Subdirectory containing per-database subdirectories", "/versions/18/tables/0/rows/2/c1": "File recording the log file(s) currently written to by the logging collector", "/versions/18/tables/0/rows/3/c1": "Subdirectory containing cluster-wide tables, such as pg_database", "/versions/18/tables/0/rows/4/c1": "Subdirectory containing transaction commit timestamp data", "/versions/18/tables/0/rows/5/c1": "Subdirectory containing files used by the dynamic shared memory subsystem", "/versions/18/tables/0/rows/6/c1": "Subdirectory containing status data for logical decoding", "/versions/18/tables/0/rows/7/c1": "Subdirectory containing multitransaction status data (used for shared row locks)", "/versions/18/tables/0/rows/8/c1": "Subdirectory containing LISTEN/NOTIFY status data", "/versions/18/tables/0/rows/9/c1": "Subdirectory containing replication slot data", "/versions/18/tables/0/rows/10/c1": "Subdirectory containing information about committed serializable transactions", "/versions/18/tables/0/rows/11/c1": "Subdirectory containing exported snapshots", "/versions/18/tables/0/rows/12/c1": "Subdirectory containing permanent files for the statistics subsystem", "/versions/18/tables/0/rows/13/c1": "Subdirectory containing temporary files for the statistics subsystem", "/versions/18/tables/0/rows/14/c1": "Subdirectory containing subtransaction status data", "/versions/18/tables/0/rows/15/c1": "Subdirectory containing symbolic links to tablespaces", "/versions/18/tables/0/rows/16/c1": "Subdirectory containing state files for prepared transactions", "/versions/18/tables/0/rows/17/c1": "Subdirectory containing WAL (Write Ahead Log) files", "/versions/18/tables/0/rows/18/c1": "Subdirectory containing transaction commit status data", "/versions/18/tables/0/rows/19/c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM", "/versions/18/tables/0/rows/20/c1": "A file recording the command-line options the server was last started with", "/versions/18/tables/0/rows/21/c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)", "/versions/18/tables/0/columns/0/label": "Item", "/versions/18/tables/0/columns/1/label": "Description"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "8685c87dcbc9ef532d5f89e4db5917ae183ee72e37dbdbcd5f3d0dc01f7a5ad4"}, "comparison_data": {"layouts": [{"key": "layout-0", "rows": [{"c0": "PG_VERSION", "c1": "A file containing the major version number of PostgreSQL"}, {"c0": "base", "c1": "Subdirectory containing per-database subdirectories"}, {"c0": "current_logfiles", "c1": "File recording the log file(s) currently written to by the logging collector"}, {"c0": "global", "c1": "Subdirectory containing cluster-wide tables, such as pg_database"}, {"c0": "pg_commit_ts", "c1": "Subdirectory containing transaction commit timestamp data"}, {"c0": "pg_dynshmem", "c1": "Subdirectory containing files used by the dynamic shared memory subsystem"}, {"c0": "pg_logical", "c1": "Subdirectory containing status data for logical decoding"}, {"c0": "pg_multixact", "c1": "Subdirectory containing multitransaction status data (used for shared row locks)"}, {"c0": "pg_notify", "c1": "Subdirectory containing LISTEN/NOTIFY status data"}, {"c0": "pg_replslot", "c1": "Subdirectory containing replication slot data"}, {"c0": "pg_serial", "c1": "Subdirectory containing information about committed serializable transactions"}, {"c0": "pg_snapshots", "c1": "Subdirectory containing exported snapshots"}, {"c0": "pg_stat", "c1": "Subdirectory containing permanent files for the statistics subsystem"}, {"c0": "pg_stat_tmp", "c1": "Subdirectory containing temporary files for the statistics subsystem"}, {"c0": "pg_subtrans", "c1": "Subdirectory containing subtransaction status data"}, {"c0": "pg_tblspc", "c1": "Subdirectory containing symbolic links to tablespaces"}, {"c0": "pg_twophase", "c1": "Subdirectory containing state files for prepared transactions"}, {"c0": "pg_wal", "c1": "Subdirectory containing WAL (Write Ahead Log) files"}, {"c0": "pg_xact", "c1": "Subdirectory containing transaction commit status data"}, {"c0": "postgresql.auto.conf", "c1": "A file used for storing configuration parameters that are set by ALTER SYSTEM"}, {"c0": "postmaster.opts", "c1": "A file recording the command-line options the server was last started with"}, {"c0": "postmaster.pid", "c1": "A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)"}], "title": "Contents of PGDATA", "columns": [{"key": "c0", "label": "Item"}, {"key": "c1", "label": "Description"}]}]}, "comparison_hash": "6a33c677ffbfe17d60a976fb592903ea0b99fc5b534b695392130aee3fceaff0", "manual_language": "zh"}, "comparison": {"left": "12", "right": "13", "status": "changed", "diff": "--- PostgreSQL 12\n+++ PostgreSQL 13\n@@ -99,7 +99,7 @@\n         },\n         {\n           \"c0\": \"postmaster.pid\",\n-          \"c1\": \"A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)\"\n+          \"c1\": \"A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (could be empty), first valid listen_address (IP address or * , or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown)\"\n         }\n       ],\n       \"title\": \"Contents of PGDATA\""}}