psql -d appdb -c "CHECKPOINT;"

Category: Databases & SQL

psql -d appdb -c "CHECKPOINT;"

Force a write-ahead log checkpoint

Forces the postmaster to flush all dirty buffers to disk and advance the write-ahead log (WAL), normally done on its own schedule. A forced checkpoint shortens recovery time before a planned shutdown.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.