Introduction
Logical replication is a method of replicating logical changes based upon their replica identity. Now in Fujitsu Enterprise Postgres 15, a few important enhancements are introduced in logical replication. Here we introduce three key new features.
Allow publication of all tables in a schema
Up to Fujitsu Enterprise Postgres 14, to create a publication for a schema with n tables, you need to specify those n tables manually during CREATE PUBLICATION. Whenever new tables are added to the schema, they must be added to publication explicitly using ALTER PUBLICATION.
Now in Fujitsu Enterprise Postgres 15, you can add all the tables of a specific schema for logical replication during CREATE PUBLICATION.
Let’s see how all the tables in a particular schema can be added to the publication, including the new tables created after the publication is created, using Fujitsu Enterprise Postgres 15 CREATE PUBLICATION...TABLES IN SCHEMA option.
For more details of this enhancement, visit this article.
Logical replication of tables in schema in PostgreSQL 15
Allow publication content to be filtered using a WHERE clause
Up to Fujitsu Enterprise Postgres 14, it was not possible to filter rows with WHERE clause in the CREATE PUBLICATION. Publishing all rows of a table may have adverse effect on network traffic and sensitive data.
Now in Fujitsu Enterprise Postgres 15, this limitation is mitigated. You can specify WHERE clause in CREATE/ ALTER PUBLICATION statement. This allows to limit the table’s tuples replicated.
Let’s see how the rows of a table can be filtered in FEP15 CREATE PUBLICATION based on WHERE clause expression.
For more details of this enhancement, visit this article.
Introducing publication row filters
Allow publications to be restricted to specific columns
Up to Fujitsu Enterprise Postgres 14, it is not possible to list specific columns of a table in CREATE/ ALTER PUBLICATION. Publishing all columns of a table may have adverse effect on network traffic and sensitive data.
Now in Fujitsu Enterprise Postgres 15, this limitation is mitigated. You can specify column lists in CREATE/ ALTER PUBLICATION statement. This allows to replicate only specific columns of a table.
Let’s see with Fujitsu Enterprise Postgres 15 CREATE PUBLICATION how only selected columns can be published, instead of all the columns of a table.
For more details of this enhancement, visit this article.
Column lists in logical replication publications - an overview of this useful PostgreSQL feature
Summary
To summarize, this post helps to leverage the new features of logical replication, by replicating only relevant data, reducing administrative overhead and protect sensitive data.
is an enhanced distribution of PostgreSQL, 100% compatible and with extended features.