This guide provides step-by-step instructions to connect your Neon database to Sequin.

Enable logical replication on Neon

To enable logical replication on Neon, follow these steps:

1

Navigate to Neon console

Open your project in the Neon console.

2

Access Project settings

From the Neon Dashboard, navigate to the Project settings section.

3

Find Beta section

Within Project Settings, locate the Beta section.

4

Enable logical replication

Click on the Enable button to activate logical replication.

Enable logical replication

Learn more about enabling logical replication in Neon here.

Connect Sequin to your Neon database

After enabling logical replication on Neon, you’ll now connect to your Neon database in Sequin.

1

Enter connection details in Sequin

In the Sequin Console, click on the Connect Database button and enter the following details for your Neon database:

You can find these connection details in your Neon project dashboard under the “Connection details” section:

Neon connection details
  • Host: Your Neon host (e.g., ep-cool-snow-123456.us-east-2.aws.neon.tech)
  • Port: 5432 (default Postgres port)
  • Database: Your database name
  • Username: Your Neon username
  • Password: Your Neon password

Make sure to enable the SSL option for secure connection.

2

Create a replication slot

Use the SQL Editor in your Neon project to execute the following SQL query to create a replication slot:

SELECT pg_create_logical_replication_slot('sequin_slot', 'pgoutput');

This creates a replication slot named sequin_slot.

3

Create a publication

Next, create a publication to indicate which tables will publish changes to the replication slot. Run the following SQL command:

CREATE PUBLICATION sequin_pub FOR TABLE table1, table2, table3;

If you want to publish changes from all tables, you can use:

CREATE PUBLICATION sequin_pub FOR ALL TABLES;
4

Enter the replication slot details in Sequin

Back in the Sequin Console, enter the name of the replication slot (e.g. sequin_slot) and publication (e.g. sequin_pub) you just created. Then, name your database and click Create Database.

Create a consumer

With your Neon database connected to Sequin via a replication slot and publication, Sequin is now detecting changes to your tables. Now create a consumer to process your data changes and send them to your application.

Click the Add a consumer button and select your Neon database as the source. Follow the instructions in our quickstart guide to complete the process.

Next steps

With your Neon database connected to Sequin, you can now:

  • Set up filters to capture specific changes.
  • Use Sequin’s observability features to monitor and debug your data flows.
  • Explore Sequin’s replay and backfill features for historical data processing.

For more information on these features, check out our core concepts documentation.