Each source PostgreSQL database relies upon its logical decoding feature. In PostgreSQL, logical decoding is implemented by decoding the contents of the Write Ahead Log (WAL) files. The WAL files contain information about the history of activity on a database, and Datastream leverages these files to query data changes. For more information about how Datastream works with WAL files, see Work with PostgreSQL database WAL files.
Publication and replication slots
When you configure your PostgreSQL source, you need to create a publication and a replication slot.
A publication is a set of changes generated from a table, or a group of tables, that you want to replicate using logical replication.
A replication slot is a PostgreSQL feature which ensures that a stream of changes stored in a WAL log file is replicated to the destination in the correct order.
Each replication slot streams a sequence of changes from a single database, and each publication exists in only one database, so you need to create one or more streams per database.
For more information, see Publication and Replication slots in PostgreSQL documentation.
Supported databases
Datastream works with the following types of PostgreSQL databases:
- AlloyDB for PostgreSQL
- AlloyDB Omni
- Amazon Aurora PostgreSQL
- Amazon RDS for PostgreSQL
- Cloud SQL for PostgreSQL
- Self-managed PostgreSQL (on-premise or cloud-hosted)
What's next
- Learn how to configure an AlloyDB for PostgreSQL database to work with Datastream.
- Learn how to configure AlloyDB Omni to work with Datastream.
- Learn how to configure an Amazon Aurora PostgreSQL database to work with Datastream.
- Learn how to configure an Amazon RDS for PostgreSQL database to work with Datastream.
- Learn how to configure a Cloud SQL for PostgreSQL database to work with Datastream.
- Learn how to configure a self-managed PostgreSQL database to work with Datastream.