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).
Signatures & examples
pg_switch_wal () → pg_lsn
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.Version history 2