Logical replication in PostgreSQL is moving forward

Peter Eisentraut

peter@eisentraut.org
@petereisentraut

About me

What is logical replication?

Decoding-based systems

Decoding-based systems

New in PostgreSQL 15

Row filter

CREATE PUBLICATION p1
  FOR TABLE tab1 WHERE (x > 0);

Column selection

CREATE PUBLICATION p1
  FOR TABLE tab1 (a, b, c);

All tables in a schema

CREATE PUBLICATION p1
  FOR ALL TABLES IN SCHEMA sch1;

Skip erroring transactions

ALTER SUBSCRIPTION s1
  SKIP (lsn = '0/12345');

Deactivate failing subscriptions

CREATE SUBSCRIPTION s1
  ...
  WITH (disable_on_error = true);

More pg_stat_*

=# SELECT * FROM pg_stat_subscription_stats;
 subid | subname | apply_error_count | sync_error_count | stats_reset
-------+---------+-------------------+------------------+-------------
 ...

Less superuser

Plan for PostgreSQL 16

Possible future features

Summary