Additional replication features
Finally, there are a handful of replication-related features that made it into PostgreSQL, and that are mostly centered around logical decoding.
Two-phase commit for logical decoding
Two-phase commit (2PC) has been an integral part of PostgreSQL for many years. However, up to now, 2PC was not supported by logical decoding. While it was possible to use it with normal replication, logical decoding was not supported. This has now changed. We are now able to decode 2PC transactions and send them to the replica as a logical stream.
Adding row and column filtering
More changes also made it into CREATE PUBLICATION
. Two features are especially noteworthy:
- Column filtering
- Row filtering
Let us take a look at row filtering first:
CREATE PUBLICATION my_pub_1 FOR TABLE some_table WHERE (col1 > 10);
In this case, we only publish a subset of data to the other side. In addition to rows, we can also tailor our publications to...