Reader small image

You're reading from  Mastering PostgreSQL 15 - Fifth Edition

Product typeBook
Published inJan 2023
PublisherPackt
ISBN-139781803248349
Edition5th Edition
Right arrow
Author (1)
Hans-Jürgen Schönig
Hans-Jürgen Schönig
author image
Hans-Jürgen Schönig

Hans-Jürgen Schönig has 20 years' experience with PostgreSQL. He is the CEO of a PostgreSQL consulting and support company called CYBERTEC PostgreSQL International GmbH. It has successfully served countless customers around the globe. Before founding CYBERTEC PostgreSQL International GmbH in 2000, he worked as a database developer at a private research company that focused on the Austrian labor market, where he primarily worked on data mining and forecast models. He has also written several books about PostgreSQL.
Read more about Hans-Jürgen Schönig

Right arrow

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering PostgreSQL 15 - Fifth Edition
Published in: Jan 2023Publisher: PacktISBN-13: 9781803248349

Author (1)

author image
Hans-Jürgen Schönig

Hans-Jürgen Schönig has 20 years' experience with PostgreSQL. He is the CEO of a PostgreSQL consulting and support company called CYBERTEC PostgreSQL International GmbH. It has successfully served countless customers around the globe. Before founding CYBERTEC PostgreSQL International GmbH in 2000, he worked as a database developer at a private research company that focused on the Austrian labor market, where he primarily worked on data mining and forecast models. He has also written several books about PostgreSQL.
Read more about Hans-Jürgen Schönig