{"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","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":[],"slug":"checkpoint","source_rev":"b7bd9cda","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":"b7bd9cda","Facts":{"anchor":"SQL-CHECKPOINT","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"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"checkpoint","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"CHECKPOINT","Summary":"强制执行一次预写式日志检查点","BodyHTML":"\u003cpre\u003eCHECKPOINT\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e检查点是预写式日志序列中的一个位置，到这一位置时，所有数据文件都已更新，以反映日志中的信息。所有数据文件都会被刷写到磁盘。有关检查点期间会发生什么的更多细节，参见\u003ca href=\"/docs/18/wal-configuration.html\" rel=\"nofollow\"\u003e第 28.5 节\u003c/a\u003e。\u003c/p\u003e\u003cp\u003e\u003ccode\u003eCHECKPOINT\u003c/code\u003e命令会在发出该命令时强制立即执行检查点，而不是等待系统安排的常规检查点（由\u003ca href=\"/docs/18/runtime-config-wal.html#RUNTIME-CONFIG-WAL-CHECKPOINTS\" rel=\"nofollow\"\u003e第 19.5.2 节\u003c/a\u003e中的设置控制）。\u003ccode\u003eCHECKPOINT\u003c/code\u003e并非设计用于正常运行期间。\u003c/p\u003e\u003cp\u003e如果在恢复期间执行\u003ccode\u003eCHECKPOINT\u003c/code\u003e命令，它将强制执行一个重启点（见\u003ca href=\"/docs/18/wal-configuration.html\" rel=\"nofollow\"\u003e第 28.5 节\u003c/a\u003e），而不是写入一个新的检查点。\u003c/p\u003e\u003cp\u003e只有超级用户，或者具有\u003ca href=\"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\" rel=\"nofollow\"\u003epg_checkpoint\u003c/a\u003e角色权限的用户，才能调用\u003ccode\u003eCHECKPOINT\u003c/code\u003e。\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eCHECKPOINT\u003c/code\u003e命令是 \u003cspan\u003ePostgreSQL\u003c/span\u003e的一种语言扩展。\u003c/p\u003e\u003c/section\u003e","SourceRevision":"ca936764","ContentHash":"9385aa9a27872eccd4541f5843a4bb2d407eccc1fe60b10271a1e88c11324511","Payload":{"purpose_zh":"强制执行一次预写式日志检查点","sections":[{"html":"\u003cp\u003e检查点是预写式日志序列中的一个位置，到这一位置时，所有数据文件都已更新，以反映日志中的信息。所有数据文件都会被刷写到磁盘。有关检查点期间会发生什么的更多细节，参见\u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL 配置\"\u003e第 28.5 节\u003c/a\u003e。\u003c/p\u003e\u003cp\u003e\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e命令会在发出该命令时强制立即执行检查点，而不是等待系统安排的常规检查点（由\u003ca href=\"/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并非设计用于正常运行期间。\u003c/p\u003e\u003cp\u003e如果在恢复期间执行\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e命令，它将强制执行一个重启点（见\u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL 配置\"\u003e第 28.5 节\u003c/a\u003e），而不是写入一个新的检查点。\u003c/p\u003e\u003cp\u003e只有超级用户，或者具有\u003ca href=\"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-CHECKPOINT\"\u003epg_checkpoint\u003c/a\u003e角色权限的用户，才能调用\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e。\u003c/p\u003e","key":"description","title":"描述"},{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eCHECKPOINT\u003c/code\u003e命令是 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e的一种语言扩展。\u003c/p\u003e","key":"compatibility","title":"兼容性"}],"sections_same_as":"","synopsis_html":"CHECKPOINT","synopsis_text":"CHECKPOINT"}},"RequestedLocale":"zh-Hans","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}
