Changelog

Private Preview: Source Versioning for PostgreSQL sources

11.18.2025

Source versioning allows you to incorporate schema changes from upstream databases with zero downtime in Materialize. With this release, you can now handle adding a new column, or dropping a column, in a PostgreSQL source connected to Materialize.

To allow source versioning, we’ve significantly rebuilt how sources work in Materialize. And we’ve made a slight modification to the syntax for creating a source. The code block below shows what it now looks like to create a source which can handle upstream schema changes.

1
-- Create the source from a connection:
2
CREATE SOURCE IF NOT EXISTS my_source
3
    FROM POSTGRES CONNECTION pg_connection (PUBLICATION mz_source);
4

5
-- Create a table to represent the upstream table which you want to replicate:
6
CREATE SCHEMA v1;
7
CREATE TABLE v1.T
8
    FROM SOURCE my_source(REFERENCE public.T);
sql

If you're not ready to use the new syntax yet, don't worry - the old syntax will continue to be supported.

Follow our detailed guide here for a tutorial on how to handle adding a new column, or dropping a column, from your upstream source PostgreSQL database. This feature is available in private preview for Materialize Cloud and Materialize Self-Managed (v26.0.0+). Contact us for access to this feature.