Updated on 2023-10-23 GMT+08:00

Restrictions

Publication-subscription is implemented based on logical replication and inherits all restrictions of logical replication. In addition, publication-subscription has the following additional restrictions or missing functions.
  • Database schemas and DDL commands are not replicated. Initial schemas can be manually copied by using gs_dump --schema-only. Subsequent schema changes need to be manually synchronized.
  • Sequence data is not replicated. The data in the serial or identifier columns backed by sequences will be replicated as part of the table, but the sequences themselves on the subscriber have no change. If the subscriber is a read-only database, this is not a problem. However, if some kind of switchover or failover to the subscriber is intended, the sequence needs to be updated to the latest value, either by copying the current data from the publisher (perhaps using gs_dump) or by determining a sufficiently large value from the tables themselves.
  • Only tables, including partitioned tables, can be replicated. Attempts to replicate other types of relations, such as views, materialized views, or foreign tables, will result in errors.
  • Multiple subscriptions in the same database cannot subscribe to the same publication (that is, the same published table). Otherwise, duplicate data or primary key conflicts may occur.
  • If a published table contains data types that do not support B-tree or hash indexes (such as the geography types), the table must have a primary key so that UPDATE and DELETE operations can be successfully replicated to the subscriber. Otherwise, the replication will fail, and the message "FATAL: could not identify an equality operator for type xx" will be displayed on the subscriber.