How to connect DigitalOcean Managed PostgreSQL to Materialize
Materialize can read data from DigitalOcean Managed PostgreSQL via the direct Postgres Source.
Materialize will need access to connect to the upstream database. This is usually controlled by IP address. If you are hosting your own installation of Materialize, in the DigitalOcean console, add your Materialize instance’s IP address to the Trusted Source list for your Managed PostgreSQL Cluster.
If you are using Materialize Cloud, you can follow these steps to get the static IP address of your instance.
Connect to your PostgreSQL cluster as the
doadminuser and create a publication with the tables you want to replicate:
CREATE PUBLICATION mz_source FOR TABLE table1, table2;
Note: Because the
doadminuser is not a superuser, you will not be able to create a publication for all tables.
mz_sourcepublication will contain the set of change events generated from the specified tables, and will later be used to ingest the replication stream.
For more information, see the Managed PostgreSQL documentation.