{"kind": "tool", "major": "18", "item": {"slug": "pg-checksums", "name": "pg_checksums", "name_zh": "", "category": "\u670d\u52a1\u7aef\u7a0b\u5e8f", "summary": "pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c", "aliases": ["pg_checksums"], "content_hash": "538f237aca7f25bd093049063eddee4cbf2ed06ba3757bb7f9c2fcec2f3ddc81", "versions": {"12": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "12.22"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "10"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/12/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/12/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/12/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/12/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/12/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/12/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/12/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/12/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/12/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/12/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/12/postgresql-12-A4.pdf", "bytes": 13424351, "pages": 2803, "sha256": "7422cf53fd1939e7a3d2925231a88b0330e468afa5393627cac0ff86158a0621", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/12/postgresql-12-US.pdf", "bytes": 13322565, "pages": 2958, "sha256": "51f3b04e72907fc38512685946223452ea65f84419c60c66241dfa3396035e77", "built_at": "2026-09-26"}}, "tree": "12", "index": "index.html", "major": "12", "pages": 1131, "release": "12.22", "source_url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "svg_assets": 2, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "revision": "7a827e97cbfacd7febff75f34443e2043e40723de5b6d8c9d81a9430b65a37e4", "evidence_kind": "English manual and source declarations", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "https://pg.center/docs/12/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "12.22 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "227bd278a0a1c348be37b328077beac0126143b03db30c9de7bbd1b2e47cbbd6", "language": "en", "original_url": "/docs/12/app-pgchecksums.html"}, {"url": "https://pg.center/docs/12/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "7f6ae1fadc1b0bffa606551460e62aacdc2508a3fb66566ddae861928ca6080b", "language": "en", "original_url": "/docs/12/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PG_CHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/12/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "f3e3f3836fae7a4a6ca6d377d7b016353c67f2b3105781e5a71220d242859955", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/12/facts/0/label": "Documented executable", "/versions/12/facts/1/label": "Executable version", "/versions/12/facts/2/label": "Reference inventory", "/versions/12/facts/2/value": "Server applications", "/versions/12/facts/3/label": "Option definition groups", "/versions/12/tables/0/title": "Documented options", "/versions/12/tables/1/title": "Environment variables", "/versions/12/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/12/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/12/tables/0/rows/2/summary": "Disables checksums.", "/versions/12/tables/0/rows/3/summary": "Enables checksums.", "/versions/12/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/12/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/12/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/12/tables/0/rows/7/summary": "Enable verbose output. Lists all checked files.", "/versions/12/tables/0/rows/8/summary": "Print the pg_checksums version and exit.", "/versions/12/tables/0/rows/9/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/12/tables/0/columns/0/label": "Option and arguments", "/versions/12/tables/0/columns/1/label": "Description", "/versions/12/tables/1/columns/0/label": "Variable", "/versions/12/tables/1/columns/1/label": "Meaning", "/versions/12/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/12/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "5a3b28c839ffbcdddcc8ab9f06b17873fa27b1458bd8ab931ff99a2d9a96b29d"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dc177d5e3b70222dba48a916063353fd7bd6e09a1784594b268608ed54ea9e7a", "manual_language": "zh"}, "13": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "13.23"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "10"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/13/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/13/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/13/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/13/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/13/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/13/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/13/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/13/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/13/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/13/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/13/postgresql-13-A4.pdf", "bytes": 13843239, "pages": 2826, "sha256": "171cc09f90936dbc1cbd503a98ff07ae72ea58ab9771ff051313f1217737799c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/13/postgresql-13-US.pdf", "bytes": 13739572, "pages": 2984, "sha256": "48d09c6e197d9db4220f41afe83efe848a8661b1b168d3b89419751ecaf6c24d", "built_at": "2026-09-26"}}, "tree": "13", "index": "index.html", "major": "13", "pages": 1139, "release": "13.23", "source_url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "revision": "614ee3133270254e476c118cdf6f72af78d4e4b8bbd9b28ed9ab1e14e4e9c0f6", "evidence_kind": "English manual and source declarations", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "https://pg.center/docs/13/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "13.23 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "bbcd9ada6cdeebe1cf403334d113915cee5081cc4583e4dff5c39a16cfaa427d", "language": "en", "original_url": "/docs/13/app-pgchecksums.html"}, {"url": "https://pg.center/docs/13/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "074ef8577fd368272a2360309e1226e2d0b1e570a3e1da62dfcca63ac9ee5539", "language": "en", "original_url": "/docs/13/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PG_CHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/13/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "92b9777af678984f282ccb8c9c4464d89adb2c6148dc9f07eb9a3c484944c776", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/13/facts/0/label": "Documented executable", "/versions/13/facts/1/label": "Executable version", "/versions/13/facts/2/label": "Reference inventory", "/versions/13/facts/2/value": "Server applications", "/versions/13/facts/3/label": "Option definition groups", "/versions/13/tables/0/title": "Documented options", "/versions/13/tables/1/title": "Environment variables", "/versions/13/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/13/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/13/tables/0/rows/2/summary": "Disables checksums.", "/versions/13/tables/0/rows/3/summary": "Enables checksums.", "/versions/13/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/13/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/13/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/13/tables/0/rows/7/summary": "Enable verbose output. Lists all checked files.", "/versions/13/tables/0/rows/8/summary": "Print the pg_checksums version and exit.", "/versions/13/tables/0/rows/9/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/13/tables/0/columns/0/label": "Option and arguments", "/versions/13/tables/0/columns/1/label": "Description", "/versions/13/tables/1/columns/0/label": "Variable", "/versions/13/tables/1/columns/1/label": "Meaning", "/versions/13/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/13/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "e0fd41644ec0ff98d00bc1d1c6de5eec854a3876ede0e6b50b63ab4946fc4dd7"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dc177d5e3b70222dba48a916063353fd7bd6e09a1784594b268608ed54ea9e7a", "manual_language": "zh"}, "14": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "14.24"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "10"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/14/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/14/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/14/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/14/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/14/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/14/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/14/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/14/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/14/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/14/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/14/postgresql-14-A4.pdf", "bytes": 14354704, "pages": 2944, "sha256": "8bc6b9dd7b246888bb77f0a5e8c39a2eae52e9926569832669c7d1600becb27c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/14/postgresql-14-US.pdf", "bytes": 14242178, "pages": 3102, "sha256": "b7ecb5a5f62d8b9f73a69e25a7d26ba285373bc53168a553bff7b77955506db4", "built_at": "2026-09-26"}}, "tree": "14", "index": "index.html", "major": "14", "pages": 1158, "release": "14.24", "source_url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "revision": "588700d46356d8837c77c7c0a4e71e645fe6535983b8f1830aa8f2e4e41c40ae", "evidence_kind": "English manual and source declarations", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "https://pg.center/docs/14/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "14.24 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "54c52f23b0e8a506574a9ee17afd63fa50ca361f0ddd064f188b7870953bb812", "language": "en", "original_url": "/docs/14/app-pgchecksums.html"}, {"url": "https://pg.center/docs/14/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "db0cdccaa8d3c65ad3b2a07d4956eb5a783a18505bfa0f9d9626eef4ab94fe44", "language": "en", "original_url": "/docs/14/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PG_CHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/14/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "471d1b9369420cceaacad2db88604af4d153ba3e3ff5e2cce5ad45b58cb7a868", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/14/facts/0/label": "Documented executable", "/versions/14/facts/1/label": "Executable version", "/versions/14/facts/2/label": "Reference inventory", "/versions/14/facts/2/value": "Server applications", "/versions/14/facts/3/label": "Option definition groups", "/versions/14/tables/0/title": "Documented options", "/versions/14/tables/1/title": "Environment variables", "/versions/14/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/14/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/14/tables/0/rows/2/summary": "Disables checksums.", "/versions/14/tables/0/rows/3/summary": "Enables checksums.", "/versions/14/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/14/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/14/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/14/tables/0/rows/7/summary": "Enable verbose output. Lists all checked files.", "/versions/14/tables/0/rows/8/summary": "Print the pg_checksums version and exit.", "/versions/14/tables/0/rows/9/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/14/tables/0/columns/0/label": "Option and arguments", "/versions/14/tables/0/columns/1/label": "Description", "/versions/14/tables/1/columns/0/label": "Variable", "/versions/14/tables/1/columns/1/label": "Meaning", "/versions/14/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/14/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d317486ee332ad0f882b1105ef98c2df30e54b696c37484754e077a8e4dfad55"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dc177d5e3b70222dba48a916063353fd7bd6e09a1784594b268608ed54ea9e7a", "manual_language": "zh"}, "15": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "15.19"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "10"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/15/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/15/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/15/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/15/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/15/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/15/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/15/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/15/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/15/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/15/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/15/postgresql-15-A4.pdf", "bytes": 14609140, "pages": 2987, "sha256": "66228564a4d16efb47d6a914085716ecfe22ca1566db56bc7c3d82f790646d72", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/15/postgresql-15-US.pdf", "bytes": 14495690, "pages": 3153, "sha256": "645a498c2390d47a6223ec74770631185807a19c484edb0fc5a295d9f460bc02", "built_at": "2026-09-26"}}, "tree": "15", "index": "index.html", "major": "15", "pages": 1168, "release": "15.19", "source_url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "revision": "6af958c6520151fc7697d56e0616b03fb00522c4568158674d452ae0644ba545", "evidence_kind": "English manual and source declarations", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "https://pg.center/docs/15/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "15.19 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "2c83df8804201a1d1b6fc7dab1ca63871686b1a01ce0d735c580bbceff800b66", "language": "en", "original_url": "/docs/15/app-pgchecksums.html"}, {"url": "https://pg.center/docs/15/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "1240cfbb13ebfd22aac8d5ae40c62a9015b246f7774bcf0bce97355ce06350a0", "language": "en", "original_url": "/docs/15/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PG_CHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/15/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "a845e540ab208f2b1f3e7999bb823a0ece1213154bdb595bc6615ae38c8d25f1", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/15/facts/0/label": "Documented executable", "/versions/15/facts/1/label": "Executable version", "/versions/15/facts/2/label": "Reference inventory", "/versions/15/facts/2/value": "Server applications", "/versions/15/facts/3/label": "Option definition groups", "/versions/15/tables/0/title": "Documented options", "/versions/15/tables/1/title": "Environment variables", "/versions/15/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/15/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/15/tables/0/rows/2/summary": "Disables checksums.", "/versions/15/tables/0/rows/3/summary": "Enables checksums.", "/versions/15/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/15/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/15/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/15/tables/0/rows/7/summary": "Enable verbose output. Lists all checked files.", "/versions/15/tables/0/rows/8/summary": "Print the pg_checksums version and exit.", "/versions/15/tables/0/rows/9/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/15/tables/0/columns/0/label": "Option and arguments", "/versions/15/tables/0/columns/1/label": "Description", "/versions/15/tables/1/columns/0/label": "Variable", "/versions/15/tables/1/columns/1/label": "Meaning", "/versions/15/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/15/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "c49cf3ddbcbc05fe71f4e2f214ecd34deac70522adee72781e3aacc79db6cbd1"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dc177d5e3b70222dba48a916063353fd7bd6e09a1784594b268608ed54ea9e7a", "manual_language": "zh"}, "16": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "16.15"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "10"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/16/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/16/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/16/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/16/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/16/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/16/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/16/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/16/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/16/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/16/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/16/postgresql-16-A4.pdf", "bytes": 15282337, "pages": 3055, "sha256": "4bb6c1f63deedac98736d8c4c7bc0fad0ac24e85b07e21ee10411872f06afd06", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/16/postgresql-16-US.pdf", "bytes": 15164148, "pages": 3220, "sha256": "5b6b6166c89991199e144bb0ae34c17a5f29826251dbf19db1abc0df3a3e771b", "built_at": "2026-09-26"}}, "tree": "16", "index": "index.html", "major": "16", "pages": 1169, "release": "16.15", "source_url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "revision": "3c21e58b35318021716440e67bb8bafd392b6a2b965a244d90e9e33c99e0bdef", "evidence_kind": "English manual and source declarations", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "https://pg.center/docs/16/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "16.15 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "36e362f6ae0915dd10a98609d98a51e9dfe832d2f4a3ac45c1304de3627d4618", "language": "en", "original_url": "/docs/16/app-pgchecksums.html"}, {"url": "https://pg.center/docs/16/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "8aaa4422eece8f26d84715f855d9d0f7f87b200f8b82898c73c865ee42c2c70f", "language": "en", "original_url": "/docs/16/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/16/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "8ff9cc34eb53c832042ae8cfea2c938d3a5625c6fb6578ec6e675dcaa9d7af3e", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/16/facts/0/label": "Documented executable", "/versions/16/facts/1/label": "Executable version", "/versions/16/facts/2/label": "Reference inventory", "/versions/16/facts/2/value": "Server applications", "/versions/16/facts/3/label": "Option definition groups", "/versions/16/tables/0/title": "Documented options", "/versions/16/tables/1/title": "Environment variables", "/versions/16/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/16/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/16/tables/0/rows/2/summary": "Disables checksums.", "/versions/16/tables/0/rows/3/summary": "Enables checksums.", "/versions/16/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/16/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/16/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/16/tables/0/rows/7/summary": "Enable verbose output. Lists all checked files.", "/versions/16/tables/0/rows/8/summary": "Print the pg_checksums version and exit.", "/versions/16/tables/0/rows/9/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/16/tables/0/columns/0/label": "Option and arguments", "/versions/16/tables/0/columns/1/label": "Description", "/versions/16/tables/1/columns/0/label": "Variable", "/versions/16/tables/1/columns/1/label": "Meaning", "/versions/16/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/16/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "bf7df5167e653e1f3ad2f52b1e0bfea5487538f1b9222d98b510692c1b8c3646"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dc177d5e3b70222dba48a916063353fd7bd6e09a1784594b268608ed54ea9e7a", "manual_language": "zh"}, "17": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "17.11"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "11"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u8bbe\u4e3a fsync \uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c pg_checksums \u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "--sync-method= method"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/17/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/17/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/17/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/17/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/17/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/17/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/17/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/17/app-pgchecksums.html", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/17/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/17/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/17/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/17/postgresql-17-A4.pdf", "bytes": 15521293, "pages": 3099, "sha256": "1991354df0dc89e70ec39328c28988ef8b19c6a93671dab3893650b63e9f4e36", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/17/postgresql-17-US.pdf", "bytes": 15398150, "pages": 3270, "sha256": "07696c8f38abf31babf22d2db337093936e7c472d2af36d050b000c49bbcf52c", "built_at": "2026-09-26"}}, "tree": "17", "index": "index.html", "major": "17", "pages": 1143, "release": "17.11", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "revision": "58419c9b0dd42cb34c8d53695bb025a7e582edf55ccd4c5bcb1c2c7c71a37487", "evidence_kind": "English manual and source declarations", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "https://pg.center/docs/17/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "17.11 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "088d4d799d0334e62132c19aff06daacb91becddfe984848ff5df2f73b68a31e", "language": "en", "original_url": "/docs/17/app-pgchecksums.html"}, {"url": "https://pg.center/docs/17/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "01f07993ff020684f4c290d17cdafa26fb17ea5c1d476bc3a5efc68bf8ddd9b9", "language": "en", "original_url": "/docs/17/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8bbe\u4e3a<code class=\"literal\">fsync</code>\uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002</p>\n<p lang=\"zh\">\u5728 Linux \u4e0a\uff0c\u4e5f\u53ef\u4ee5\u6539\u7528<code class=\"literal\">syncfs</code>\uff0c\u8bf7\u6c42\u64cd\u4f5c\u7cfb\u7edf\u540c\u6b65\u5305\u542b\u6570\u636e\u76ee\u5f55\u3001WAL \u6587\u4ef6\u4ee5\u53ca\u6bcf\u4e2a\u8868\u7a7a\u95f4\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u4f7f\u7528<code class=\"literal\">syncfs</code>\u65f6\u9700\u6ce8\u610f\u7684\u4e8b\u9879\u89c1<a class=\"xref\" href=\"/docs/17/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a>\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"option\">--no-sync</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/17/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "1d200901772970ffaaa86b8186ea4ef55564c67e922f1a2cf7f80006d91e0510", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[0]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[21]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/17/facts/0/label": "Documented executable", "/versions/17/facts/1/label": "Executable version", "/versions/17/facts/2/label": "Reference inventory", "/versions/17/facts/2/value": "Server applications", "/versions/17/facts/3/label": "Option definition groups", "/versions/17/tables/0/title": "Documented options", "/versions/17/tables/1/title": "Environment variables", "/versions/17/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/17/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/17/tables/0/rows/2/summary": "Disables checksums.", "/versions/17/tables/0/rows/3/summary": "Enables checksums.", "/versions/17/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/17/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/17/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/17/tables/0/rows/7/summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "/versions/17/tables/0/rows/8/summary": "Enable verbose output. Lists all checked files.", "/versions/17/tables/0/rows/9/summary": "Print the pg_checksums version and exit.", "/versions/17/tables/0/columns/0/label": "Option and arguments", "/versions/17/tables/0/columns/1/label": "Description", "/versions/17/tables/0/rows/10/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/17/tables/1/columns/0/label": "Variable", "/versions/17/tables/1/columns/1/label": "Meaning", "/versions/17/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/17/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d592fd62e5e0ec21975e7c6c0344239502f989e3fa1f856fd7d9780f762a4a5b"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "9df98d0a65050d461414d0c4fc42b1f97bbb808ec68690d4aad884d9b571bb05", "manual_language": "zh"}, "18": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "11"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u8bbe\u4e3a fsync \uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c pg_checksums \u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "--sync-method= method"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/18/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/18/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/18/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/18/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/18/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/18/app-pgchecksums.html", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "18.6 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "b16216257df55c09f6cc76f43a9c8ac811fda49b3a4490608f936681aa3cd4c2", "language": "en", "original_url": "/docs/18/app-pgchecksums.html"}, {"url": "https://pg.center/docs/18/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3", "language": "en", "original_url": "/docs/18/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8bbe\u4e3a<code class=\"literal\">fsync</code>\uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002</p>\n<p lang=\"zh\">\u5728 Linux \u4e0a\uff0c\u4e5f\u53ef\u4ee5\u6539\u7528<code class=\"literal\">syncfs</code>\uff0c\u8bf7\u6c42\u64cd\u4f5c\u7cfb\u7edf\u540c\u6b65\u5305\u542b\u6570\u636e\u76ee\u5f55\u3001WAL \u6587\u4ef6\u4ee5\u53ca\u6bcf\u4e2a\u8868\u7a7a\u95f4\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u4f7f\u7528<code class=\"literal\">syncfs</code>\u65f6\u9700\u6ce8\u610f\u7684\u4e8b\u9879\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a>\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"option\">--no-sync</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/18/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "52fc2b5e6f0927d14e93093316ac2b48c1d0462af868c84be88447880d4084d8", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[0]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[21]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Server applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/tables/1/title": "Environment variables", "/versions/18/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/18/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/18/tables/0/rows/2/summary": "Disables checksums.", "/versions/18/tables/0/rows/3/summary": "Enables checksums.", "/versions/18/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/18/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/18/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/18/tables/0/rows/7/summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "/versions/18/tables/0/rows/8/summary": "Enable verbose output. Lists all checked files.", "/versions/18/tables/0/rows/9/summary": "Print the pg_checksums version and exit.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/18/tables/1/columns/0/label": "Variable", "/versions/18/tables/1/columns/1/label": "Meaning", "/versions/18/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/18/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "1570dedca3f150c2d02227d960e298ed7c57e2f1c4e831380a65315aa1f00fb8"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "9df98d0a65050d461414d0c4fc42b1f97bbb808ec68690d4aad884d9b571bb05", "manual_language": "zh"}, "19": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "19beta4"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "11"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-D datadir --pgdata= datadir"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u8bbe\u4e3a fsync \uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c pg_checksums \u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "--sync-method= method"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D datadir", "--pgdata= datadir"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D datadir --pgdata= datadir", "source_url": "/docs/19/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/19/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/19/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/19/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/19/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/19/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/19/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/19/app-pgchecksums.html", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/19/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/19/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/19/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/19/postgresql-19-A4.pdf", "bytes": 16064841, "pages": 3052, "sha256": "4dd099e4125c591128fc5f3ebd02178dc24781f9e5ae629f96d67c4c8547427b", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/19/postgresql-19-US.pdf", "bytes": 15974616, "pages": 3225, "sha256": "61971fa857f0956d47341a0388fa6af9ae10acf691d4b2fc009007d384b0342b", "built_at": "2026-09-26"}}, "tree": "19", "index": "index.html", "major": "19", "pages": 1155, "release": "19beta4", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "svg_assets": 5, "source_mode": "en SGML built with pinned official archive", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "revision": "1bbbbf4133d426f0e4304010688d2984c30fb67df0cc3a61b3e37eb3f6f37833", "evidence_kind": "English manual and source declarations", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "https://pg.center/docs/19/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "19beta4 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "dd9067d67ff9ed5993cf25f73b71d393f56a7d0ab93ec23873e2ef2c5a83f96d", "language": "en", "original_url": "/docs/19/app-pgchecksums.html"}, {"url": "https://pg.center/docs/19/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "425b070323b448b5516d2cb4e9e4ac77efb5d19dd4e8005d0ae1c61db9ec78e6", "language": "en", "original_url": "/docs/19/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [ [ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ] <em class=\"replaceable\"><code>datadir</code></em> ]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span> \u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u6709\u5173\u6570\u636e\u6821\u9a8c\u548c\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/checksums.html\" title=\"28.2.\u00a0\u6570\u636e\u6821\u9a8c\u548c\">\u7b2c\u00a028.2\u00a0\u8282</a>\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>datadir</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>datadir</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8bbe\u4e3a<code class=\"literal\">fsync</code>\uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002</p>\n<p lang=\"zh\">\u5728 Linux \u4e0a\uff0c\u4e5f\u53ef\u4ee5\u6539\u7528<code class=\"literal\">syncfs</code>\uff0c\u8bf7\u6c42\u64cd\u4f5c\u7cfb\u7edf\u540c\u6b65\u5305\u542b\u6570\u636e\u76ee\u5f55\u3001WAL \u6587\u4ef6\u4ee5\u53ca\u6bcf\u4e2a\u8868\u7a7a\u95f4\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u4f7f\u7528<code class=\"literal\">syncfs</code>\u65f6\u9700\u6ce8\u610f\u7684\u4e8b\u9879\u89c1<a class=\"xref\" href=\"/docs/19/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a>\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"option\">--no-sync</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/19/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n<p lang=\"zh\">\u76ee\u6807\u96c6\u7c07\u5fc5\u987b\u4e0e <span class=\"application\">pg_checksums</span> \u5177\u6709\u76f8\u540c\u7684\u4e3b\u7248\u672c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "d6e7546c8fb5b8da88029ffd57b250e3d8873800926127cd75205c053a443511", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[0]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[21]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]", "#APP-PGCHECKSUMS/div[7]/p[4]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/19/facts/0/label": "Documented executable", "/versions/19/facts/1/label": "Executable version", "/versions/19/facts/2/label": "Reference inventory", "/versions/19/facts/2/value": "Server applications", "/versions/19/facts/3/label": "Option definition groups", "/versions/19/tables/0/title": "Documented options", "/versions/19/tables/1/title": "Environment variables", "/versions/19/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/19/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/19/tables/0/rows/2/summary": "Disables checksums.", "/versions/19/tables/0/rows/3/summary": "Enables checksums.", "/versions/19/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/19/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/19/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/19/tables/0/rows/7/summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "/versions/19/tables/0/rows/8/summary": "Enable verbose output. Lists all checked files.", "/versions/19/tables/0/rows/9/summary": "Print the pg_checksums version and exit.", "/versions/19/tables/0/columns/0/label": "Option and arguments", "/versions/19/tables/0/columns/1/label": "Description", "/versions/19/tables/0/rows/10/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/19/tables/1/columns/0/label": "Variable", "/versions/19/tables/1/columns/1/label": "Meaning", "/versions/19/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/19/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "83e12441a658855e71f6136e82c7f7f8bb607339139e53f3a269ef265b0fa8f2"}, "comparison_data": {"options": [{"names": ["-D datadir", "--pgdata= datadir"], "signature": "-D datadir --pgdata= datadir", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "b78f786be12c8dfb559cec46b186c2035be9748e1a181f507423aca26d8746fb", "manual_language": "zh"}, "20": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "20devel"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "11"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-D datadir --pgdata= datadir"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u8bbe\u4e3a fsync \uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c pg_checksums \u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "--sync-method= method"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D datadir", "--pgdata= datadir"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D datadir --pgdata= datadir", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/devel/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/devel/app-pgchecksums.html", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/devel/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/20/postgresql-20-A4.pdf", "bytes": 16030631, "pages": 3052, "sha256": "bd5d82c0ce38fc18f92a0447818a91a193a261776bca1c37564bf9a683e177d0", "built_at": "2026-09-28"}, "US": {"url": "/files/documentation/pdf/20/postgresql-20-US.pdf", "bytes": 15936613, "pages": 3223, "sha256": "d97d9e0db479a02f4234b175f50fcad70c3661619afc8d6df9b9437882e3c299", "built_at": "2026-09-28"}}, "tree": "0", "index": "index.html", "major": "20", "pages": 1156, "release": "20devel", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "svg_assets": 6, "source_mode": "en SGML built with pinned official archive", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_snapshot_utc": "26-Sep-2026 20:22"}, "revision": "2eba5e0fd4c3bffb2803247b6cd537878e9d6ee5a6dfbe3c50ece8b421b80918", "evidence_kind": "English manual and source declarations", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "https://pg.center/docs/devel/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "20devel English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "b884c32f34255d468bf249cf449169cf42e8321b2956409f70ffefa4ea42bd08", "language": "en", "original_url": "/docs/devel/app-pgchecksums.html"}, {"url": "https://pg.center/docs/devel/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "5532c1ebfb8c6f310301be63a28daf0ae212e2a78025bea61a1bdca99e02c43d", "language": "en", "original_url": "/docs/devel/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [ [ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ] <em class=\"replaceable\"><code>datadir</code></em> ]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span> \u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u4e5f\u53ef\u4ee5\u5728\u96c6\u7c07\u8fd0\u884c\u671f\u95f4\u542f\u7528\u6821\u9a8c\u548c\uff0c\u5177\u4f53\u8fc7\u7a0b\u89c1<a class=\"xref\" href=\"/docs/devel/checksums.html#CHECKSUMS-ONLINE-ENABLE-DISABLE\" title=\"28.2.2.\u00a0\u5728\u7ebf\u542f\u7528\u6821\u9a8c\u548c\">Online Enabling of Checksums</a>\uff1b\u6709\u5173\u4e0d\u540c\u65b9\u6cd5\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/checksums.html\" title=\"28.2.\u00a0\u6570\u636e\u6821\u9a8c\u548c\">\u7b2c\u00a028.2\u00a0\u8282</a>\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u96c6\u7c07\u5173\u95ed\u65f6\u6b63\u5904\u4e8e<a class=\"xref\" href=\"/docs/devel/checksums.html#CHECKSUMS-ONLINE-ENABLE-DISABLE\" title=\"28.2.2.\u00a0\u5728\u7ebf\u542f\u7528\u6821\u9a8c\u548c\">Online Enabling of Checksums</a>\u6240\u8ff0\u7684\u5728\u7ebf\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u8fc7\u7a0b\u4e2d\uff0c\u63a7\u5236\u6587\u4ef6\u4ecd\u4f1a\u8bb0\u5f55\u8be5\u4e2d\u65ad\u72b6\u6001\uff0c<span class=\"application\">pg_checksums</span>\u5c06\u62d2\u7edd\u4ee5\u4efb\u4f55\u6a21\u5f0f\u8fd0\u884c\u3002\u8bf7\u542f\u52a8\u96c6\u7c07\u5e76\u5c06\u5176\u5e72\u51c0\u5173\u95ed\u4ee5\u91cd\u7f6e\u8be5\u72b6\u6001\uff0c\u7136\u540e\u91cd\u8bd5\uff1b\u5728\u5907\u5e93\u4e0a\uff0c\u8bf7\u5148\u8ba9\u590d\u5236\u5b8c\u6210\u8be5\u8f6c\u6362\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>datadir</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>datadir</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8bbe\u4e3a<code class=\"literal\">fsync</code>\uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002</p>\n<p lang=\"zh\">\u5728 Linux \u4e0a\uff0c\u4e5f\u53ef\u4ee5\u6539\u7528<code class=\"literal\">syncfs</code>\uff0c\u8bf7\u6c42\u64cd\u4f5c\u7cfb\u7edf\u540c\u6b65\u5305\u542b\u6570\u636e\u76ee\u5f55\u3001WAL \u6587\u4ef6\u4ee5\u53ca\u6bcf\u4e2a\u8868\u7a7a\u95f4\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u4f7f\u7528<code class=\"literal\">syncfs</code>\u65f6\u9700\u6ce8\u610f\u7684\u4e8b\u9879\u89c1<a class=\"xref\" href=\"/docs/devel/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a>\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"option\">--no-sync</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<span class=\"application\">pg_checksums</span>\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u6539\u672c\u5730\u6570\u636e\u76ee\u5f55\uff1b\u65b0\u72b6\u6001\u4e0d\u4f1a\u88ab\u590d\u5236\u5230\u4efb\u4f55\u5176\u4ed6\u8282\u70b9\u3002\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5fc5\u987b\u5bf9\u6bcf\u4e2a\u8282\u70b9\u5e94\u7528\u76f8\u540c\u7684\u66f4\u6539\uff1a</p>\n<div class=\"procedure\">\n<ol class=\"procedure\">\n<li class=\"step\" id=\"SHUT-DOWN-NODES\" lang=\"zh\">\n<p class=\"title\"><strong>\u5173\u95ed\u6240\u6709\u8282\u70b9</strong></p>\n<p>\u53c2\u4e0e\u590d\u5236\u7684\u6240\u6709\u8282\u70b9\u90fd\u5fc5\u987b\u4ee5\u5e72\u51c0\u5173\u95ed\u7684\u65b9\u5f0f\u505c\u6b62\uff1b<span class=\"application\">pg_checksums</span>\u62d2\u7edd\u5728\u7acb\u5373\u5173\u95ed\u540e\u9057\u7559\u7684\u6570\u636e\u76ee\u5f55\u4e0a\u8fd0\u884c\u3002\u5728\u505c\u6b62\u5907\u5e93\u4e4b\u524d\uff0c\u786e\u4fdd\u5b83\u5df2\u91cd\u653e\u4e3b\u5e93\u7684\u6240\u6709 WAL\uff1a\u5148\u505c\u6b62\u4e3b\u5e93\uff0c\u7528<a class=\"xref\" href=\"/docs/devel/app-pgcontroldata.html\" title=\"pg_controldata\"><span class=\"refentrytitle\"><span class=\"application\">pg_controldata</span></span></a>\u8bfb\u53d6\u5176<span class=\"quote\">\u201c<span class=\"quote\">Latest checkpoint location</span>\u201d</span>\uff08\u6700\u65b0\u68c0\u67e5\u70b9\u4f4d\u7f6e\uff09\uff0c\u5e76\u68c0\u67e5\u5907\u5e93\u4e0a\u7684<code class=\"function\">pg_last_wal_replay_lsn()</code>\u662f\u5426\u5df2\u63a8\u8fdb\u5230\u8d85\u8fc7\u5b83\u3002\u4ec5\u6bd4\u8f83\u91cd\u653e\u4f4d\u7f6e\u4e0e<code class=\"function\">pg_last_wal_receive_lsn()</code>\u662f\u4e0d\u591f\u7684\uff0c\u56e0\u4e3a\u540e\u8005\u53ea\u8868\u660e\u5907\u5e93\u5df2\u63a5\u6536\u7684 WAL \u5df2\u88ab\u91cd\u653e\u3002</p>\n</li>\n<li class=\"step\" lang=\"zh\">\n<p class=\"title\"><strong>\u5728\u6bcf\u4e2a\u8282\u70b9\u4e0a\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c</strong></p>\n<p>\u5728\u590d\u5236\u73af\u5883\u4e2d\u6bcf\u4e2a\u8282\u70b9\u7684\u6570\u636e\u76ee\u5f55\u4e0a\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u3002\u5404\u8282\u70b9\u53ef\u4ee5\u5728\u505c\u673a\u671f\u95f4\u5e76\u884c\u5904\u7406\u3002\u5fc5\u987b\u6240\u6709\u8282\u70b9\u90fd\u6210\u529f\u5b8c\u6210\u5904\u7406\u540e\u624d\u80fd\u7ee7\u7eed\u3002</p>\n</li>\n<li class=\"step\" lang=\"zh\">\n<p class=\"title\"><strong>\u91cd\u542f\u6240\u6709\u8282\u70b9</strong></p>\n<p>\u6b63\u5e38\u542f\u52a8\u5404\u8282\u70b9\uff0c\u9a8c\u8bc1<a class=\"xref\" href=\"/docs/devel/runtime-config-preset.html#GUC-DATA-CHECKSUMS\">data_checksums</a>\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\uff0c\u5e76\u76d1\u89c6\u5404\u5907\u5e93\u7684\u65e5\u5fd7\u4e2d\u662f\u5426\u51fa\u73b0\u6570\u636e\u6821\u9a8c\u548c\u72b6\u6001\u4e0d\u5339\u914d\u7684\u8b66\u544a\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\"><a class=\"xref\" href=\"/docs/devel/app-pgchecksums.html#SHUT-DOWN-NODES\" title=\"\u5173\u95ed\u6240\u6709\u8282\u70b9\">\u6b65\u9aa4 1</a>\u4e2d\u7684\u91cd\u653e\u8981\u6c42\u5b58\u5728\u7684\u539f\u56e0\u662f\uff1a\u79bb\u7ebf\u66f4\u6539\u53ea\u8bb0\u5f55\u5728\u63a7\u5236\u6587\u4ef6\u4e2d\uff0c\u76f8\u5bf9\u4e8e\u8282\u70b9\u5c1a\u672a\u91cd\u653e\u7684 WAL \u6ca1\u6709\u786e\u5b9a\u7684\u987a\u5e8f\uff1b\u89c1<a class=\"xref\" href=\"/docs/devel/checksums.html#CHECKSUMS-OFFLINE-ENABLE-DISABLE\" title=\"28.2.1.\u00a0\u79bb\u7ebf\u542f\u7528\u6821\u9a8c\u548c\">\u7b2c\u00a028.2.1\u00a0\u8282</a>\u3002\u5728\u91cd\u653e\u5728\u7ebf\u6821\u9a8c\u548c\u72b6\u6001\u66f4\u6539\u4e4b\u524d\u505c\u6b62\u7684\u8282\u70b9\uff0c\u4f1a\u5728\u91cd\u65b0\u542f\u52a8\u65f6\u5e94\u7528\u8be5\u66f4\u6539\uff0c\u8986\u76d6\u79bb\u7ebf\u66f4\u6539\uff0c\u5404\u8282\u70b9\u7684\u72b6\u6001\u4f1a\u6084\u7136\u5206\u53c9\uff0c\u76f4\u5230\u7a0d\u540e\u7684\u68c0\u67e5\u70b9\u8bb0\u5f55\u89e6\u53d1\u4e0b\u8ff0\u8b66\u544a\u3002\u56e0\u6b64\uff0c\u6700\u597d\u4e0d\u8981\u6df7\u7528\u8fd9\u4e24\u79cd\u673a\u5236\uff1a\u8981\u4e48\u7528\u4e0a\u9762\u7684\u79bb\u7ebf\u6d41\u7a0b\u66f4\u6539\u590d\u5236\u73af\u5883\u7684\u72b6\u6001\uff0c\u8981\u4e48\u7528\u5728\u7ebf\u8f6c\u6362\uff0c\u5e76\u786e\u4fdd\u5728\u4e0a\u4e00\u6b21\u66f4\u6539\u5230\u8fbe\u6bcf\u4e2a\u8282\u70b9\u4e4b\u540e\u518d\u5f00\u59cb\u4e0b\u4e00\u6b21\u66f4\u6539\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u66f4\u6539\u7684\u5e94\u7528\u4e0d\u4e00\u81f4\uff0c\u6bcf\u4e2a\u8282\u70b9\u90fd\u4f1a\u4fdd\u6301\u81ea\u5df1\u7684\u72b6\u6001\uff0c\u5f53\u91cd\u653e\u7684 WAL \u4e2d\u8bb0\u5f55\u7684\u72b6\u6001\u4e0e\u81ea\u8eab\u72b6\u6001\u4e0d\u540c\u65f6\uff0c\u5907\u5e93\u4f1a\u8bb0\u5f55\u4e00\u6761\u8b66\u544a\u3002\u5728\u5907\u5e93\u901a\u8fc7\u91cd\u653e WAL \u8ffd\u8d76\u8fdb\u5ea6\u65f6\uff0c\u5982\u679c\u6240\u91cd\u653e\u7684 WAL \u5199\u4e8e\u8be5\u66f4\u6539\u88ab\u4e00\u81f4\u5e94\u7528\u4e4b\u524d\uff0c\u4e5f\u53ef\u80fd\u77ed\u6682\u51fa\u73b0\u540c\u6837\u7684\u8b66\u544a\uff1b\u4e00\u65e6\u643a\u5e26\u65b0\u72b6\u6001\u7684\u68c0\u67e5\u70b9\u8bb0\u5f55\u88ab\u91cd\u653e\uff0c\u8b66\u544a\u5c31\u4f1a\u505c\u6b62\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5907\u5e93\u7684\u6570\u636e\u76ee\u5f55\u4ece\u672a\u8ba1\u7b97\u8fc7\u6821\u9a8c\u548c\uff0c\u5c31\u4e0d\u5f97\u901a\u8fc7\u8fd9\u79cd\u8ffd\u8d76\u65b9\u5f0f\u542f\u7528\u6821\u9a8c\u548c\u3002\u8bf7\u6309\u4e0a\u6587\u6240\u8ff0\u5728\u5907\u5e93\u505c\u673a\u65f6\u5bf9\u5176\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u3001\u5728\u7ebf\u542f\u7528\u6821\u9a8c\u548c\uff0c\u6216\u8005\u4ece\u57fa\u7840\u5907\u4efd\u91cd\u5efa\u5b83\uff0c\u4ee5\u4f7f\u96c6\u7c07\u7684\u6821\u9a8c\u548c\u72b6\u6001\u4e00\u81f4\u3002\u6ce8\u610f\uff0c\u5728\u7ebf\u542f\u7528\u53ea\u80fd\u4ece\u6821\u9a8c\u548c\u5904\u4e8e\u5173\u95ed\u72b6\u6001\u7684\u4e3b\u5e93\u5f00\u59cb\uff0c\u56e0\u6b64\u5982\u679c\u4e3b\u5e93\u4e0a\u5df2\u7ecf\u542f\u7528\uff0c\u8bf7\u5148\u5728\u7ebf\u7981\u7528\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n<p lang=\"zh\">\u8bf8\u5982<a class=\"xref\" href=\"/docs/devel/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\u8fd9\u7c7b\u4f1a\u5728\u8282\u70b9\u4e4b\u95f4\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff0c\u8981\u6c42\u6240\u6709\u8282\u70b9\u5904\u4e8e\u76f8\u540c\u7684\u6570\u636e\u6821\u9a8c\u548c\u72b6\u6001\uff0c\u5426\u5219\u5b58\u5728\u6570\u636e\u635f\u574f\u7684\u98ce\u9669\u3002</p>\n<p lang=\"zh\">\u76ee\u6807\u96c6\u7c07\u5fc5\u987b\u4e0e <span class=\"application\">pg_checksums</span> \u5177\u6709\u76f8\u540c\u7684\u4e3b\u7248\u672c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "2c1a35b6323aece9f02c0948647afb7d0079b3afa35e63aa0693cb06d1393b52", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[4]/p[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[0]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[21]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/div[3]/ol[0]/li[0]", "#APP-PGCHECKSUMS/div[7]/div[3]/ol[0]/li[1]", "#APP-PGCHECKSUMS/div[7]/div[3]/ol[0]/li[2]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[4]", "#APP-PGCHECKSUMS/div[7]/p[5]", "#APP-PGCHECKSUMS/div[7]/p[6]", "#APP-PGCHECKSUMS/div[7]/p[7]", "#APP-PGCHECKSUMS/div[7]/p[8]", "#APP-PGCHECKSUMS/div[7]/p[9]"]}], "language": "zh", "original_text": {"/summary": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/category": "Server applications", "/versions/20/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/20/facts/0/label": "Documented executable", "/versions/20/facts/1/label": "Executable version", "/versions/20/facts/2/label": "Reference inventory", "/versions/20/facts/2/value": "Server applications", "/versions/20/facts/3/label": "Option definition groups", "/versions/20/tables/0/title": "Documented options", "/versions/20/tables/1/title": "Environment variables", "/versions/20/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/20/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/20/tables/0/rows/2/summary": "Disables checksums.", "/versions/20/tables/0/rows/3/summary": "Enables checksums.", "/versions/20/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/20/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/20/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/20/tables/0/rows/7/summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "/versions/20/tables/0/rows/8/summary": "Enable verbose output. Lists all checked files.", "/versions/20/tables/0/rows/9/summary": "Print the pg_checksums version and exit.", "/versions/20/tables/0/columns/0/label": "Option and arguments", "/versions/20/tables/0/columns/1/label": "Description", "/versions/20/tables/0/rows/10/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/20/tables/1/columns/0/label": "Variable", "/versions/20/tables/1/columns/1/label": "Meaning", "/versions/20/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/20/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "8cf1ade15a4113cc3019a94c33bff4723d446875cb96233dc2809010b208ab17"}, "comparison_data": {"options": [{"names": ["-D datadir", "--pgdata= datadir"], "signature": "-D datadir --pgdata= datadir", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [ [ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "b78f786be12c8dfb559cec46b186c2035be9748e1a181f507423aca26d8746fb", "manual_language": "zh"}}}, "snapshot": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_checksums"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u670d\u52a1\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "11"}], "tables": [{"key": "options", "rows": [{"summary": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-D directory --pgdata= directory"}}, {"summary": "\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-c --check"}}, {"summary": "\u7981\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-d --disable"}}, {"summary": "\u542f\u7528\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-e --enable"}}, {"summary": "\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a filenode \u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-f filenode --filenode= filenode"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_checksums \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_checksums \u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528 --check \u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-N --no-sync"}}, {"summary": "\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-P --progress"}}, {"summary": "\u8bbe\u4e3a fsync \uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c pg_checksums \u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "--sync-method= method"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_checksums \u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-V --version"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_checksums \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgchecksums.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGDATA", "description": "\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528 -D \u9009\u9879\u8986\u76d6\u3002"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-D directory", "--pgdata= directory"], "summary": "Specifies the directory where the database cluster is stored.", "signature": "-D directory --pgdata= directory", "source_url": "/docs/18/app-pgchecksums.html", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "summary": "Checks checksums. This is the default mode if nothing else is specified.", "signature": "-c --check", "source_url": "/docs/18/app-pgchecksums.html", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "summary": "Disables checksums.", "signature": "-d --disable", "source_url": "/docs/18/app-pgchecksums.html", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "summary": "Enables checksums.", "signature": "-e --enable", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "summary": "Only validate checksums in the relation with filenode filenode .", "signature": "-f filenode --filenode= filenode", "source_url": "/docs/18/app-pgchecksums.html", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "signature": "-N --no-sync", "source_url": "/docs/18/app-pgchecksums.html", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "signature": "-P --progress", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/18/app-pgchecksums.html", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "summary": "Enable verbose output. Lists all checked files.", "signature": "-v --verbose", "source_url": "/docs/18/app-pgchecksums.html", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "summary": "Print the pg_checksums version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pgchecksums.html", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_checksums command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pgchecksums.html", "description": "Show help about pg_checksums command line arguments, and exit."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pgchecksums.html", "file": "app-pgchecksums.html", "label": "18.6 English manual \u00b7 app-pgchecksums.html", "anchor": "", "sha256": "b16216257df55c09f6cc76f43a9c8ac811fda49b3a4490608f936681aa3cd4c2", "language": "en", "original_url": "/docs/18/app-pgchecksums.html"}, {"url": "https://pg.center/docs/18/reference-server.html", "file": "reference-server.html", "label": "Server applications inventory", "anchor": "", "sha256": "e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3", "language": "en", "original_url": "/docs/18/reference-server.html"}], "sections": [], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "signature": "pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]", "description": ["pg_checksums \u2014 \u5728 PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCHECKSUMS\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></h2>\n<p lang=\"zh\">pg_checksums \u2014 \u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u542f\u7528\u3001\u7981\u7528\u6216\u68c0\u67e5\u6570\u636e\u6821\u9a8c\u548c</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.5.5.4.1\"><code class=\"command\">pg_checksums</code> [<em class=\"replaceable\"><code>option</code></em>...] [[ <code class=\"option\">-D</code> | <code class=\"option\">--pgdata</code> ]<em class=\"replaceable\"><code>datadir</code></em>]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"R1-APP-PGCHECKSUMS-1\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_checksums</span>\u7528\u4e8e\u5728<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u4e2d\u68c0\u67e5\u3001\u542f\u7528\u6216\u7981\u7528\u6570\u636e\u6821\u9a8c\u548c\u3002\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4e4b\u524d\uff0c\u5fc5\u987b\u5148\u5c06\u670d\u52a1\u5668\u5e72\u51c0\u5173\u95ed\u3002\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u6821\u9a8c\u548c\u9519\u8bef\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u96f6\uff1b\u5982\u679c\u68c0\u6d4b\u5230\u81f3\u5c11\u4e00\u4e2a\u6821\u9a8c\u548c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u5982\u679c\u64cd\u4f5c\u5931\u8d25\uff0c\u5219\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n<p lang=\"zh\">\u5728\u9a8c\u8bc1\u6821\u9a8c\u548c\u65f6\uff0c\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u626b\u63cf\u3002\u542f\u7528\u6821\u9a8c\u548c\u65f6\uff0c\u6821\u9a8c\u548c\u53d1\u751f\u53d8\u5316\u7684\u6bcf\u4e2a\u5173\u7cfb\u6587\u4ef6\u5757\u90fd\u4f1a\u88ab\u539f\u5730\u91cd\u5199\u3002\u7981\u7528\u6821\u9a8c\u548c\u53ea\u4f1a\u66f4\u65b0\u6587\u4ef6<code class=\"filename\">pg_control</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u63d0\u4f9b\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-D <em class=\"replaceable\"><code>directory</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--pgdata=<em class=\"replaceable\"><code>directory</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--check</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u68c0\u67e5\u6821\u9a8c\u548c\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u6a21\u5f0f\uff0c\u8fd9\u662f\u9ed8\u8ba4\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-d</code><br/></span><span class=\"term\"><code class=\"option\">--disable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7981\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-e</code><br/></span><span class=\"term\"><code class=\"option\">--enable</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filenode</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--filenode=<em class=\"replaceable\"><code>filenode</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4ec5\u9a8c\u8bc1\u6587\u4ef6\u8282\u70b9\u4e3a<em class=\"replaceable\"><code>filenode</code></em>\u7684\u5173\u7cfb\u4e2d\u7684\u6821\u9a8c\u548c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br/></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_checksums</code>\u76f4\u63a5\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u4e5f\u610f\u5473\u7740\u5982\u679c\u968f\u540e\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u66f4\u65b0\u540e\u7684\u6570\u636e\u76ee\u5f55\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u5408\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u4f7f\u7528<code class=\"literal\">--check</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P</code><br/></span><span class=\"term\"><code class=\"option\">--progress</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8fdb\u5ea6\u62a5\u544a\u3002\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u5728\u68c0\u67e5\u6216\u542f\u7528\u6821\u9a8c\u548c\u65f6\u4f1a\u8f93\u51fa\u8fdb\u5ea6\u62a5\u544a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8bbe\u4e3a<code class=\"literal\">fsync</code>\uff08\u9ed8\u8ba4\u503c\uff09\u65f6\uff0c<code class=\"command\">pg_checksums</code>\u4f1a\u9012\u5f52\u6253\u5f00\u5e76\u540c\u6b65\u6570\u636e\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u3002\u67e5\u627e\u6587\u4ef6\u65f6\u4f1a\u8ddf\u968f WAL \u76ee\u5f55\u548c\u6bcf\u4e2a\u5df2\u914d\u7f6e\u8868\u7a7a\u95f4\u7684\u7b26\u53f7\u94fe\u63a5\u3002</p>\n<p lang=\"zh\">\u5728 Linux \u4e0a\uff0c\u4e5f\u53ef\u4ee5\u6539\u7528<code class=\"literal\">syncfs</code>\uff0c\u8bf7\u6c42\u64cd\u4f5c\u7cfb\u7edf\u540c\u6b65\u5305\u542b\u6570\u636e\u76ee\u5f55\u3001WAL \u6587\u4ef6\u4ee5\u53ca\u6bcf\u4e2a\u8868\u7a7a\u95f4\u7684\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u3002\u4f7f\u7528<code class=\"literal\">syncfs</code>\u65f6\u9700\u6ce8\u610f\u7684\u4e8b\u9879\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a>\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"option\">--no-sync</code>\u65f6\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u8f93\u51fa\uff0c\u5217\u51fa\u6240\u6709\u88ab\u68c0\u67e5\u7684\u6587\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_checksums</span>\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_checksums</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGDATA</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5b58\u50a8\u6570\u636e\u5e93\u96c6\u7c07\u7684\u76ee\u5f55\uff1b\u53ef\u4ee5\u7528<code class=\"option\">-D</code>\u9009\u9879\u8986\u76d6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.5.5.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5728\u5927\u578b\u96c6\u7c07\u4e2d\u542f\u7528\u6821\u9a8c\u548c\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5728\u6b64\u64cd\u4f5c\u671f\u95f4\uff0c\u4e0d\u5f97\u542f\u52a8\u8be5\u96c6\u7c07\uff0c\u4e5f\u4e0d\u5f97\u542f\u52a8\u4efb\u4f55\u4f1a\u5411\u6570\u636e\u76ee\u5f55\u5199\u5165\u5185\u5bb9\u7684\u5176\u4ed6\u7a0b\u5e8f\uff0c\u5426\u5219\u53ef\u80fd\u53d1\u751f\u6570\u636e\u4e22\u5931\u3002</p>\n<p lang=\"zh\">\u5728\u590d\u5236\u73af\u5883\u4e2d\uff0c\u5982\u679c\u914d\u5408\u4f1a\u76f4\u63a5\u590d\u5236\u5173\u7cfb\u6587\u4ef6\u5757\u7684\u5de5\u5177\uff08\u4f8b\u5982<a class=\"xref\" href=\"/docs/18/app-pgrewind.html\" title=\"pg_rewind\"><span class=\"refentrytitle\"><span class=\"application\">pg_rewind</span></span></a>\uff09\u4f7f\u7528\uff0c\u800c\u53c8\u6ca1\u6709\u5728\u6240\u6709\u8282\u70b9\u4e0a\u4e00\u81f4\u5730\u6267\u884c\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u7684\u64cd\u4f5c\uff0c\u5c31\u53ef\u80fd\u9020\u6210\u8868\u73b0\u4e3a\u6821\u9a8c\u548c\u4e0d\u6b63\u786e\u7684\u9875\u9762\u635f\u574f\u3002\u56e0\u6b64\uff0c\u5728\u590d\u5236\u73af\u5883\u4e2d\u5207\u6362\u6821\u9a8c\u548c\u65f6\uff0c\u5efa\u8bae\u5148\u505c\u6b62\u6240\u6709\u96c6\u7c07\uff0c\u518d\u4e00\u81f4\u5730\u5207\u6362\u6240\u6709\u8282\u70b9\u3002\u53e6\u4e00\u79cd\u5b89\u5168\u505a\u6cd5\u662f\u9500\u6bc1\u6240\u6709\u5907\u5e93\uff0c\u5728\u4e3b\u5e93\u4e0a\u6267\u884c\u8be5\u64cd\u4f5c\uff0c\u6700\u540e\u4ece\u5934\u91cd\u5efa\u5404\u5907\u5e93\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5728\u542f\u7528\u6216\u7981\u7528\u6821\u9a8c\u548c\u671f\u95f4<span class=\"application\">pg_checksums</span>\u88ab\u4e2d\u6b62\u6216\u6740\u6389\uff0c\u90a3\u4e48\u96c6\u7c07\u7684\u6570\u636e\u6821\u9a8c\u548c\u914d\u7f6e\u5c06\u4fdd\u6301\u4e0d\u53d8\uff0c\u5e76\u4e14\u53ef\u4ee5\u91cd\u65b0\u8fd0\u884c<span class=\"application\">pg_checksums</span>\u4ee5\u6267\u884c\u540c\u4e00\u64cd\u4f5c\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pgchecksums.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pgchecksums.html", "method": "same-major semantic node", "sha256": "52fc2b5e6f0927d14e93093316ac2b48c1d0462af868c84be88447880d4084d8", "language": "zh", "matched_nodes": ["#APP-PGCHECKSUMS/div[2]/p[1]", "#APP-PGCHECKSUMS/div[3]/h2[0]", "#APP-PGCHECKSUMS/div[4]/p[1]", "#APP-PGCHECKSUMS/div[4]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[11]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[13]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[0]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[15]/p[2]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[17]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[19]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[21]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[5]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[7]", "#APP-PGCHECKSUMS/div[5]/div[2]/dl[0]/dd[9]", "#APP-PGCHECKSUMS/div[5]/p[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[1]", "#APP-PGCHECKSUMS/div[6]/div[1]/dl[0]/dd[3]", "#APP-PGCHECKSUMS/div[6]/h2[0]", "#APP-PGCHECKSUMS/div[7]/h2[0]", "#APP-PGCHECKSUMS/div[7]/p[1]", "#APP-PGCHECKSUMS/div[7]/p[2]", "#APP-PGCHECKSUMS/div[7]/p[3]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_checksums \u2014 enable, disable or check data checksums in a PostgreSQL database cluster", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Server applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/tables/1/title": "Environment variables", "/versions/18/tables/0/rows/0/summary": "Specifies the directory where the database cluster is stored.", "/versions/18/tables/0/rows/1/summary": "Checks checksums. This is the default mode if nothing else is specified.", "/versions/18/tables/0/rows/2/summary": "Disables checksums.", "/versions/18/tables/0/rows/3/summary": "Enables checksums.", "/versions/18/tables/0/rows/4/summary": "Only validate checksums in the relation with filenode filenode .", "/versions/18/tables/0/rows/5/summary": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .", "/versions/18/tables/0/rows/6/summary": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.", "/versions/18/tables/0/rows/7/summary": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace.", "/versions/18/tables/0/rows/8/summary": "Enable verbose output. Lists all checked files.", "/versions/18/tables/0/rows/9/summary": "Print the pg_checksums version and exit.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Show help about pg_checksums command line arguments, and exit.", "/versions/18/tables/1/columns/0/label": "Variable", "/versions/18/tables/1/columns/1/label": "Meaning", "/versions/18/tables/1/rows/0/description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option.", "/versions/18/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "1570dedca3f150c2d02227d960e298ed7c57e2f1c4e831380a65315aa1f00fb8"}, "comparison_data": {"options": [{"names": ["-D directory", "--pgdata= directory"], "signature": "-D directory --pgdata= directory", "description": "Specifies the directory where the database cluster is stored."}, {"names": ["-c", "--check"], "signature": "-c --check", "description": "Checks checksums. This is the default mode if nothing else is specified."}, {"names": ["-d", "--disable"], "signature": "-d --disable", "description": "Disables checksums."}, {"names": ["-e", "--enable"], "signature": "-e --enable", "description": "Enables checksums."}, {"names": ["-f filenode", "--filenode= filenode"], "signature": "-f filenode --filenode= filenode", "description": "Only validate checksums in the relation with filenode filenode ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check ."}, {"names": ["-P", "--progress"], "signature": "-P --progress", "description": "Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_checksums will recursively open and synchronize all files in the data directory. The search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file systems that contain the data directory, the WAL files, and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enable verbose output. Lists all checked files."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_checksums version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_checksums command line arguments, and exit."}], "synopsis": ["pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]"], "environment": [{"name": "PGDATA", "description": "Specifies the directory where the database cluster is stored; can be overridden using the -D option."}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "9df98d0a65050d461414d0c4fc42b1f97bbb808ec68690d4aad884d9b571bb05", "manual_language": "zh"}, "comparison": {"left": "11", "right": "12", "status": "added", "diff": "--- PostgreSQL 11\n+++ PostgreSQL 12\n@@ -1 +1,97 @@\n-\u8be5\u7248\u672a\u6536\u5f55\n+{\n+  \"environment\": [\n+    {\n+      \"description\": \"Specifies the directory where the database cluster is stored; can be overridden using the -D option.\",\n+      \"name\": \"PGDATA\"\n+    },\n+    {\n+      \"description\": \"Specifies whether to use color in diagnostic messages. Possible values are always , auto and never .\",\n+      \"name\": \"PG_COLOR\"\n+    }\n+  ],\n+  \"options\": [\n+    {\n+      \"description\": \"Specifies the directory where the database cluster is stored.\",\n+      \"names\": [\n+        \"-D directory\",\n+        \"--pgdata= directory\"\n+      ],\n+      \"signature\": \"-D directory --pgdata= directory\"\n+    },\n+    {\n+      \"description\": \"Checks checksums. This is the default mode if nothing else is specified.\",\n+      \"names\": [\n+        \"-c\",\n+        \"--check\"\n+      ],\n+      \"signature\": \"-c --check\"\n+    },\n+    {\n+      \"description\": \"Disables checksums.\",\n+      \"names\": [\n+        \"-d\",\n+        \"--disable\"\n+      ],\n+      \"signature\": \"-d --disable\"\n+    },\n+    {\n+      \"description\": \"Enables checksums.\",\n+      \"names\": [\n+        \"-e\",\n+        \"--enable\"\n+      ],\n+      \"signature\": \"-e --enable\"\n+    },\n+    {\n+      \"description\": \"Only validate checksums in the relation with filenode filenode .\",\n+      \"names\": [\n+        \"-f filenode\",\n+        \"--filenode= filenode\"\n+      ],\n+      \"signature\": \"-f filenode --filenode= filenode\"\n+    },\n+    {\n+      \"description\": \"By default, pg_checksums will wait for all files to be written safely to disk. This option causes pg_checksums to return without waiting, which is faster, but means that a subsequent operating system crash can leave the updated data directory corrupt. Generally, this option is useful for testing but should not be used on a production installation. This option has no effect when using --check .\",\n+      \"names\": [\n+        \"-N\",\n+        \"--no-sync\"\n+      ],\n+      \"signature\": \"-N --no-sync\"\n+    },\n+    {\n+      \"description\": \"Enable progress reporting. Turning this on will deliver a progress report while checking or enabling checksums.\",\n+      \"names\": [\n+        \"-P\",\n+        \"--progress\"\n+      ],\n+      \"signature\": \"-P --progress\"\n+    },\n+    {\n+      \"description\": \"Enable verbose output. Lists all checked files.\",\n+      \"names\": [\n+        \"-v\",\n+        \"--verbose\"\n+      ],\n+      \"signature\": \"-v --verbose\"\n+    },\n+    {\n+      \"description\": \"Print the pg_checksums version and exit.\",\n+      \"names\": [\n+        \"-V\",\n+        \"--version\"\n+      ],\n+      \"signature\": \"-V --version\"\n+    },\n+    {\n+      \"description\": \"Show help about pg_checksums command line arguments, and exit.\",\n+      \"names\": [\n+        \"-?\",\n+        \"--help\"\n+      ],\n+      \"signature\": \"-? --help\"\n+    }\n+  ],\n+  \"synopsis\": [\n+    \"pg_checksums [ option ...] [[ -D | --pgdata ] datadir ]\"\n+  ]\n+}"}}