BARMAN-SWITCH-WAL(1)

πŸ’… BARMAN-SWITCH-WAL ✨

okay so bestie, welcome to the barman-switch-wal page from the Barman manual (section 1, sub-commands energy) πŸŽ€ this is the little command that makes Postgres flip to a brand new WAL file, and honestly? she's iconic for it.


🌸 NAME 🌸

barman-switch-wal β€” Barman Sub-Commands πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

switch-wal
    [ --archive ]
    [ --archive-timeout ]
    [ --force ]
    [ { -h | --help } ]
    SERVER_NAME [ SERVER_NAME ... ]

✨ DESCRIPTION ✨

So what this does is: it runs pg_switch_wal() on the target server β€” that's for Postgres versions 10 and later β€” or pg_switch_xlog() if you're on Postgres versions 8.3 to 9.6. either way, we're switching that WAL, periodt πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

  • SERVER_NAME β€” the name of the server in barman node 🫢
  • --archive β€” she waits for one WAL file to be archived. if no WAL file gets archived within the specified time (default: 30 seconds), Barman will terminate with a failure exit code 😭. this option is also available on standby servers ✨
  • --archive-timeout β€” you're telling her how many seconds (default: 30 seconds) the archiver should wait for a new WAL file to be archived before it times out ⏳. this option is also available on standby servers too πŸ’–
  • --force β€” forces the switch by executing a CHECKPOINT before pg_switch_wal() πŸ”₯
Note: running a CHECKPOINT may increase I/O load on the Postgres server, so use this option cautiously β€” like, she's powerful but she's loud, okay? πŸ’€
  • -h / --help β€” shows a help message and exits 🌈. gives you all the info about command usage, no gatekeeping πŸ’œ

πŸ‘‘ Author πŸ‘‘

EnterpriseDB


Β© Copyright EnterpriseDB UK Limited 2011-2026


and that's the whole page, bestie 🧚 this was Barman 3.20, dated Sep 29, 2026 β€” no cap, go switch some WALs πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from