PostgreSQL update. Release of reshape, a utility for migrating to a new schema without interrupting work

Corrective updates have been generated for all supported branches of PostgreSQL: 14.2, 13.6, 12.10, 11.15 and 10.20, in which 55 bugs identified over the past three months have been fixed. This includes fixes that, under rare circumstances, cause index corruption when changing HOT (heap-only tuple) chains during a VACUUM operation or when performing a REINDEX CONCURRENTLY operation on indexes to tables that use the TOAST storage engine.

Fixed crashes when executing ALTER STATISTICS and when retrieving data with multirange types. Fixed bugs in the query planner that caused incorrect results to be displayed. Fixed memory leaks when updating indexes on expressions and when performing a "REASSIGN OWNED BY" operation on a large number of objects. Provided construction of extended statistics for sharded tables.

Additionally, we can note the release of the reshape utility, which allows you to make complex data schema updates in PostgreSQL without stopping work, which normally require manual changes and temporary shutdown of services using the database. The utility makes it possible to switch from the old data scheme to the new one without long-term locks and without interrupting the request processing cycle. The utility automatically creates table views that applications continue to work with during data schema migration, and also sets up triggers that translate data addition and deletion operations between the old and new schemas.

Thus, when using reshape during migration, the old and new schemas are simultaneously available and applications can be gradually migrated to the new schema without stopping work (in large infrastructures, you can gradually replace handlers from old to new). When applications are migrated to the new schema, the views and triggers created to retain support for the old schema are removed. If you encounter problems with your applications during migration, you can undo the schema change and revert to the old state.

Source: opennet.ru

Add a comment