PostgreSQL 14.4 update with index corruption fix

A corrective release of PostgreSQL 14.4 has been made that fixes a serious issue that, under certain circumstances, leads to silent data corruption in indexes when executing the "CREATE INDEX CONCURRENTLY" and "REINDEX CONCURRENTLY" commands. In the indexes created using the specified commands, some records may not be taken into account, which will lead to the skipping of individual rows when executing SELECT queries involving problematic indexes.

The "pg_amcheck --heapallindexed dbname" command can be used to determine if B-tree indexes are corrupted. If errors are found or if CREATE INDEX CONCURRENTLY and REINDEX CONCURRENTLY commands were used in previous releases with other types of indexes (GiST, GIN, etc.), after upgrading to version 14.4, it is recommended to re-index using the "reindexdb --all" utility or the command "REINDEX CONCURRENTLY index_name".

Only the 14.x branch is affected, which included optimizations that exclude certain transactions associated with the execution of "CREATE INDEX CONCURRENTLY" and "REINDEX CONCURRENTLY" when performing the VACUUM operation. As a result of applying these optimizations, indexes created in CONCURRENTLY mode did not include some tuples in heap memory that were updated or truncated during index creation.

Source: opennet.ru

Add a comment