github vitabaks/pg_auto_reindexer v1.7

17 hours ago

This release adds a disk free space safety check, ensuring that reindex operations do not proceed if there is insufficient disk space available. The changes introduce a new command-line option to specify a disk free space reserve, implement logic to check available space before reindexing indexes.

Disk free space safety checks:

  • Added a new option -r, --disk-free-reserve, allowing users to set a minimum disk space reserve (default: 5120 MB).
  • Implemented functions (get_pgdata_dir, get_index_dir, get_path_avail_mb, get_path_fs_id, ensure_free_space) to determine the index and data directory locations, check their filesystems, and verify sufficient free space before reindexing. The logic accounts for both cases when the index and data directory are on the same or different filesystems.
  • Integrated the disk space check into the main reindexing loop, so indexes are only processed if there is enough free space. If not, the script either stops or skips indexes depending on the sorting order.

What's Changed

  • Disable transaction_timeout option by @vitabaks in #19
  • Add disk free space checks before reindexing by @vitabaks in #20

Full Changelog: v1.6...v1.7

Don't miss a new pg_auto_reindexer release

NewReleases is sending notifications on new releases.