A Tool for PostgreSQL Transaction Log Management
Join the DZone community and get the full member experience.Join For Free
PostgreSQL developers might be interested in walctl, a new tool from Shaun M. Thomas used to safely archive PostgreSQL WAL files, which are central to database operation. Some people use more manual processes to deal with their WAL files - Thomas points to regular cp and rsync as examples - but according to Thomas, that's not the best approach:
A much safer architecture is to involve three servers. One server produces WAL files. One server acts as a storage and distribution location. One (or more) final server consumes the WAL files as necessary. In instances where streaming replication gets disconnected and the replica is too far behind for the WAL files the master server has available, the archive is a good mechanism for catching up.
And, Thomas elaborates, walctl covers all of those bases. Pre-installation setup is minimal, and the tool is intended to be as unobtrusive as possible:
It’s meant to be small, fast, and light, following the UNIX philosophy of doing one thing well.
Thomas also points to some alternative tools for WAL management, such as Barman and repmgr, stressing that his ultimate point is the critically important nature of WAL management. Check out full announcement of walctl for more details.
Opinions expressed by DZone contributors are their own.