{"Entry":{"collection":"sql","key":"checkpoint","name":"CHECKPOINT","aliases":["checkpoint"],"metadata":{"aliases":["checkpoint"],"changed_in":["19"],"changes":[{"from":"7.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"7.1"},{"from":"7.1","purpose_changed":true,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":null,"to":"7.2"},{"from":"7.3","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":["see_also"]},"status":"changed","synopsis":null,"to":"7.4"},{"from":"7.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"8.0"},{"from":"8.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"8.1"},{"from":"8.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"8.2"},{"from":"8.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"8.3"},{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"9.0"},{"from":"9.1","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"9.2"},{"from":"9.5","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"9.6"},{"from":"9.6","purpose_changed":true,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"10"},{"from":"11","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"12"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"14"},{"from":"14","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"15"},{"from":"16","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["description"],"removed":[]},"status":"changed","synopsis":null,"to":"17"},{"from":"18","purpose_changed":false,"renamed":null,"sections":{"added":["parameters"],"changed":["description"],"removed":[]},"status":"changed","synopsis":{"added":["CHECKPOINT [ ( option [, ...] ) ]","FLUSH_UNLOGGED [ boolean ]","MODE { FAST | SPREAD }"],"removed":[]},"to":"19"}],"content_hash":"fb551145df0c24783950799a694070bb7359d810ebc359c7d1cfa474d29fc535","derived_content_hash":"48cb711f7220e9543c944d8e5793bb3c7d2249ebf8d99b9100186e54e2ce494b","editorial":{},"first_version":"7.1","group":"maintenance","imported_at":"2026-09-27T17:57:27.420982+08:00","last_version":"20","name":"CHECKPOINT","object":"","position":15001,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"force a write-ahead log checkpoint","purpose_zh":"","related":[],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:b96f6415dc3a04146e9307ace49f327b02970de72dcc6bd29b6d21b86e9017d0","receipt_sha256":"94820a54fc048f13b699385917c98dd31ca9824c63f3c6fc98e580b1743b1dd6","repair":"wiki-repair-20261023"},"slug":"checkpoint","source_rev":"wiki-repair-20261023:67e942d65ffa35de116fb3f21a686072589e8a0263ff927c422e59eac8e4565e","synopsis":"CHECKPOINT [ ( option [, ...] ) ]\n\nwhere option can be one of:\n\nFLUSH_UNLOGGED [ boolean ]\nMODE { FAST | SPREAD }","verb":"CHECKPOINT"}},"Definition":{"Collection":"sql","Key":"checkpoint","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"checkpoint","SourceRevision":"wiki-repair-20261023:67e942d65ffa35de116fb3f21a686072589e8a0263ff927c422e59eac8e4565e","Facts":{"anchor":"SQL-CHECKPOINT","description_zh":"强制执行一次预写式日志检查点","description_zh_html":"\u003cpre\u003eCHECKPOINT\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n   检查点是预写式日志序列中的一个位置，到这一位置时，所有数据文件都已更新，以反映日志中的信息。所有数据文件都会被刷写到磁盘。有关检查点期间会发生什么的更多细节，参见\u003ca class=\"xref\" href=\"/zh/docs/18/wal-configuration.html\" title=\"28.5. WAL 配置\"\u003e第 28.5 节\u003c/a\u003e。\n  \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e 命令会在发出该命令时强制立即执行检查点，而不是等待系统安排的常规检查点（由\u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-wal.html#RUNTIME-CONFIG-WAL-CHECKPOINTS\" title=\"19.5.2. 检查点\"\u003e第 19.5.2 节\u003c/a\u003e中的设置控制）。\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e 并非设计用于正常运行期间。\n  \u003c/p\u003e\u003cp\u003e\n   如果在恢复期间执行 \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e 命令，它将强制执行一个重启点（见\u003ca class=\"xref\" href=\"/zh/docs/18/wal-configuration.html\" title=\"28.5. WAL 配置\"\u003e第 28.5 节\u003c/a\u003e），而不是写入一个新的检查点。\n  \u003c/p\u003e\u003cp\u003e\n   只有超级用户，或者具有 \u003ca class=\"xref\" href=\"/zh/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\"\u003epg_checkpoint\u003c/a\u003e 角色权限的用户，才能调用 \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e 命令是\n   \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 的一种语言扩展。\n  \u003c/p\u003e\u003c/section\u003e","file":"sql-checkpoint.html","lang":"en","name":"CHECKPOINT","purpose":"force a write-ahead log checkpoint","purpose_zh":"强制执行一次预写式日志检查点","related":[],"sections":[{"html":"\u003cp\u003eA checkpoint is a point in the write-ahead log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to disk. Refer to \u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL Configuration\"\u003eSection 28.5\u003c/a\u003e for more details about what happens during a checkpoint.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command forces an immediate checkpoint when the command is issued, without waiting for a regular checkpoint scheduled by the system (controlled by the settings in \u003ca href=\"/docs/18/runtime-config-wal.html#RUNTIME-CONFIG-WAL-CHECKPOINTS\" title=\"19.5.2. Checkpoints\"\u003eSection 19.5.2\u003c/a\u003e). \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e is not intended for use during normal operation.\u003c/p\u003e\u003cp\u003eIf executed during recovery, the \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command will force a restartpoint (see \u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL Configuration\"\u003eSection 28.5\u003c/a\u003e) rather than writing a new checkpoint.\u003c/p\u003e\u003cp\u003eOnly superusers or users with the privileges of the \u003ca href=\"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\"\u003epg_checkpoint\u003c/a\u003e role can call \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cp\u003eThe \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e language extension.\u003c/p\u003e","key":"compatibility","title":"Compatibility"}],"sections_same_as":"","slug":"18","synopsis_html":"CHECKPOINT","synopsis_text":"CHECKPOINT","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-checkpoint.html","sha256":"6f8b23dcd1ae2178473644541a84c3daabcb4fb36b8589b3eee22a35a8f43285"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"checkpoint","SourceDatabase":"center","Version":"18","Locale":"en","Title":"CHECKPOINT","Summary":"force a write-ahead log checkpoint","BodyHTML":"\u003cpre\u003eCHECKPOINT\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003eA checkpoint is a point in the write-ahead log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to disk. Refer to \u003ca href=\"/docs/18/wal-configuration.html\" rel=\"nofollow\"\u003eSection 28.5\u003c/a\u003e for more details about what happens during a checkpoint.\u003c/p\u003e\u003cp\u003eThe \u003ccode\u003eCHECKPOINT\u003c/code\u003e command forces an immediate checkpoint when the command is issued, without waiting for a regular checkpoint scheduled by the system (controlled by the settings in \u003ca href=\"/docs/18/runtime-config-wal.html#RUNTIME-CONFIG-WAL-CHECKPOINTS\" rel=\"nofollow\"\u003eSection 19.5.2\u003c/a\u003e). \u003ccode\u003eCHECKPOINT\u003c/code\u003e is not intended for use during normal operation.\u003c/p\u003e\u003cp\u003eIf executed during recovery, the \u003ccode\u003eCHECKPOINT\u003c/code\u003e command will force a restartpoint (see \u003ca href=\"/docs/18/wal-configuration.html\" rel=\"nofollow\"\u003eSection 28.5\u003c/a\u003e) rather than writing a new checkpoint.\u003c/p\u003e\u003cp\u003eOnly superusers or users with the privileges of the \u003ca href=\"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\" rel=\"nofollow\"\u003epg_checkpoint\u003c/a\u003e role can call \u003ccode\u003eCHECKPOINT\u003c/code\u003e.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003eThe \u003ccode\u003eCHECKPOINT\u003c/code\u003e command is a \u003cspan\u003ePostgreSQL\u003c/span\u003e language extension.\u003c/p\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:67e942d65ffa35de116fb3f21a686072589e8a0263ff927c422e59eac8e4565e","ContentHash":"3c404c10b8494f8b9dceb0a96a1344c622232fc60c343ae95ad9516f9eb10212","Payload":{"related":[],"sections":[{"html":"\u003cp\u003eA checkpoint is a point in the write-ahead log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to disk. Refer to \u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL Configuration\"\u003eSection 28.5\u003c/a\u003e for more details about what happens during a checkpoint.\u003c/p\u003e\u003cp\u003eThe \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command forces an immediate checkpoint when the command is issued, without waiting for a regular checkpoint scheduled by the system (controlled by the settings in \u003ca href=\"/docs/18/runtime-config-wal.html#RUNTIME-CONFIG-WAL-CHECKPOINTS\" title=\"19.5.2. Checkpoints\"\u003eSection 19.5.2\u003c/a\u003e). \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e is not intended for use during normal operation.\u003c/p\u003e\u003cp\u003eIf executed during recovery, the \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command will force a restartpoint (see \u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL Configuration\"\u003eSection 28.5\u003c/a\u003e) rather than writing a new checkpoint.\u003c/p\u003e\u003cp\u003eOnly superusers or users with the privileges of the \u003ca href=\"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\"\u003epg_checkpoint\u003c/a\u003e role can call \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cp\u003eThe \u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e command is a \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e language extension.\u003c/p\u003e","key":"compatibility","title":"Compatibility"}],"sections_same_as":"","synopsis_html":"CHECKPOINT","synopsis_text":"CHECKPOINT"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
