Neon PostgreSQL
Source and destination
In Polytomic, go to Connections → Add connection → Neon. The settings and required database permissions are the same as for PostgreSQL.
Choosing a hostname
Neon provides a direct hostname and a pooled hostname (with -pooler in the first part of the name). See Neon's documentation.
- Use the direct hostname if you plan to use CDC. Logical replication doesn't work through Neon's connection pooler.
- The pooled hostname works for reads and writes. Polytomic automatically adjusts how it sends queries when it detects a Neon pooled hostname.
CDC replication
To use CDC from Neon:
-
Enable logical replication for your Neon project: Settings → Postgres → Logical replication → Enable. See Neon's documentation.
Enabling logical replication is permanentYou can't disable logical replication after you enable it. Enabling it restarts your project's computes.
-
Use a role created in the Neon Console, CLI, or API for your Polytomic connection. These roles are members of
neon_superuser, which has theREPLICATIONprivilege. In Neon, you can't grantREPLICATIONto roles created with SQL, soALTER ROLE ... WITH REPLICATIONdoesn't work. -
Follow the PostgreSQL CDC replication guide to create a publication, and use the direct hostname for your connection.
Updated 17 days ago