{"repo":"vitabaks/pg_auto_reindexer","free":true,"listed":false,"github":"https://github.com/vitabaks/pg_auto_reindexer","clone":"git clone https://github.com/vitabaks/pg_auto_reindexer.git","description":"Automatic reindexing of PostgreSQL indexes (bloat cleanup).","language":"Shell","stars":128,"topics":["bloat","cleanup","index","postgresql","maintenance"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg auto reindexer Automatic reindexing of PostgreSQL indexes (bloat cleanup). pg auto reindexer automatically detects and reindexes bloated B-tree indexes with minimal locking. For PostgreSQL versions 11 and earlier, it uses pg repack; for PostgreSQL 12 and later, it uses REINDEX CONCURRENTLY. Why do I need index maintenance? Over time, PostgreSQL indexes are prone to bloat. This occurs because updates, deletes, and inserts happen continuously, while concurrent transactions may still hold snapshots of old data. As a result, empty and unused pages accumulate inside the indexes, causing them to grow unnecessarily large. This leads to increased disk usage, slower read operations, and gradual degradation of overall database performance. Regular monitoring of index health and timely reindexing are essential to keep your database running efficiently and to prevent performance issues from growing unnoticed. Usage example Output example: Help Compatibility all supported PostgreSQL versions Dependencies: For old PostgreSQL versions (11 and below) the pg repack extension package must be installed. Installation 1. Download and copy the pg auto reindexer script to /usr/local/bin/ directory 2. Grant execute rights on the scripts Example: Automating (cron) You can automate regular index maintenance by scheduling pg auto reindexer with cron . For example, add the following to /etc/cron.d/pg auto reindexer : Note: Adjust the options and maintenance window based on your environment and operat","default_branch":null,"files":null,"tree":[],"storefront":"/r/vitabaks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vitabaks/pg_auto_reindexer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}