PostgreSQL Update. Release reshape, a utility for migrating to a new schema without downtime.

Correction updates have been released for all supported PostgreSQL branches: 14.2, 13.6, 12.10, 11.15, and 10.20, fixing 55 issues discovered over the past three months. This includes resolving problems that, in rare circumstances, could lead to index corruption when modifying HOT (heap-only tuple) chains during the VACUUM operation or when performing REINDEX CONCURRENTLY on indexes for tables using the TOAST storage mechanism.

Crash issues during ALTER STATISTICS and when retrieving data with multirange types have been addressed. Errors in the query planner that resulted in incorrect output have been fixed. Memory leaks during expression index updates and during the 'REASSIGN OWNED BY' operation involving a large number of objects have been resolved. Extended statistics building for partitioned tables has been ensured.

Additionally, the release of the reshape utility allows for complex updates to the data schema in PostgreSQL without stopping operations, which would normally require manual changes and downtime for services using the database. The utility enables a transition from the old data schema to the new one without prolonged locks, maintaining the request processing cycle. It automatically creates table views, allowing applications to continue operating during the data schema migration, and sets up triggers to relay data addition and removal operations between the old and new schemas.

Thus, by using reshape during migration, the old and new schemas remain accessible simultaneously, allowing applications to be gradually transitioned to the new schema without downtime (in large infrastructures, handlers can be replaced step by step from old to new). After successfully migrating applications to the new schema, the views and triggers created to support the old schema are deleted. In case any application issues arise during migration, the schema change can be reverted, restoring the previous state.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster