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:

  1. Enable logical replication for your Neon project: Settings → Postgres → Logical replication → Enable. See Neon's documentation.

    🚧

    Enabling logical replication is permanent

    You can't disable logical replication after you enable it. Enabling it restarts your project's computes.

  2. Use a role created in the Neon Console, CLI, or API for your Polytomic connection. These roles are members of neon_superuser, which has the REPLICATION privilege. In Neon, you can't grant REPLICATION to roles created with SQL, so ALTER ROLE ... WITH REPLICATION doesn't work.

  3. Follow the PostgreSQL CDC replication guide to create a publication, and use the direct hostname for your connection.


What’s Next