{"Entry":{"collection":"func","key":"pg-switch-wal","name":"pg_switch_wal","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"10"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"f628e6d1a0e1bef1e8979c7b37ca4cf0b99ffa91e963501f52fc6ca0343fc9b0","derived_content_hash":"79c4d8cbf535bd539dc1bf1ce1f2ffda3a4ec287026227e7b5bfe6c636da921c","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:244048ed85f056baa097102c3018d776fe22d05acd0508d077f59b8fbb8f2ee6","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"10","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.675474+08:00","last_version":"20","name":"pg_switch_wal","name_key":"pg_switch_wal","position":29102,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"6f476c51f680ce2ca69023e401878a12d0031f04692a18da9f806da12480f0a9","repair":"wiki-repair-20261023"},"signature":"pg_switch_wal () → pg_lsn","signature_count":1,"slug":"pg-switch-wal","source_rev":"wiki-repair-20261023:244048ed85f056baa097102c3018d776fe22d05acd0508d077f59b8fbb8f2ee6","summary":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving).","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-switch-wal","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-switch-wal","SourceRevision":"wiki-repair-20261023:244048ed85f056baa097102c3018d776fe22d05acd0508d077f59b8fbb8f2ee6","Facts":{"description":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","description_html":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","description_zh":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，pg_switch_wal 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","description_zh_html":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","doc":{"anchor":"FUNCTIONS-ADMIN-BACKUP-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","version":"18.7"},{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"830e894d29fec30b7c350c915fcaed4a63b24d57f2c96150bf25fa07fb43849c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"admin","group_label":"系统管理函数","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","description_html":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","description_zh":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，pg_switch_wal 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","description_zh_html":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003epg_lsn\u003c/code\u003e","returns":"pg_lsn","text":"pg_switch_wal () → pg_lsn","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-admin.html","sha256":"b4fab9daceb7883fd75b32b6eb5398f2bbbfbbed5c83d1b2bf99cc8d842cdaf7"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-BACKUP-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-switch-wal","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_switch_wal","Summary":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","BodyHTML":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","SourceRevision":"wiki-repair-20261023:244048ed85f056baa097102c3018d776fe22d05acd0508d077f59b8fbb8f2ee6","ContentHash":"6494b05df97340cbdaefb0c4a3a55189db8c2ab4feb4970d3157e0c38324a546","Payload":{"description":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","description_html":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","signatures":[{"description":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","description_html":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","description_zh":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，pg_switch_wal 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","description_zh_html":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003epg_lsn\u003c/code\u003e","returns":"pg_lsn","text":"pg_switch_wal () → pg_lsn","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"adc8663562dd29306465ac19d306d930754d5ab6a9dead15ea24726843e1b517","Text":"pg_switch_wal () → pg_lsn","Returns":"pg_lsn","Payload":{"description":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, pg_switch_wal does nothing and returns the start location of the write-ahead log file currently in use.","description_html":"Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving). The result is the ending write-ahead log location plus 1 within the just-completed write-ahead log file. If there has been no write-ahead log activity since the last write-ahead log switch, \u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e does nothing and returns the start location of the write-ahead log file currently in use.","description_zh":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，pg_switch_wal 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","description_zh_html":"强制服务器切换到新的预写式日志文件，使当前文件可以归档（假设正在使用连续归档）。返回值是刚完成的预写式日志文件中的结束预写式日志位置加 1。如果自上次切换预写式日志以来没有发生任何预写式日志活动，\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e 不执行任何操作，并返回当前使用的预写式日志文件的起始位置。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_switch_wal\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003epg_lsn\u003c/code\u003e","returns":"pg_lsn","text":"pg_switch_wal () → pg_lsn","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
