title

text

Игорь Мельников
Игорь Мельников
13:10 31 March
40 min

Altering Table Structures in PostgreSQL with DBMS_REDEFINITION

In any business-critical system, there comes a need to modify table structures — whether it's adding new columns with expressions based on other columns or converting a non-partitioned table into a partitioned one.

Using standard PostgreSQL tools for large table reorganization often results in significant downtime, as tables become unavailable for writes — and sometimes even for reads — during the process.

In this talk, I’ll introduce dbms_redefinition, a custom-built extension that brings functionality similar to Oracle’s DBMS_REDEFINITION package to PostgreSQL. This solution minimizes downtime to near zero when applying schema changes in production. 

Unlike pg_repack, which does not support structural modifications, dbms_redefinition is useful for all PostgreSQL users, even beyond Oracle migrations.

I’ll share a real-world use case, discuss future development plans, and explore new features in the pipeline.

Other talks