PostgreSQL
Connect Supabase as a PostgreSQL source
Set up a Supabase project so Artie reads its changes over a direct connection, with a dedicated database user and a publication.
When you create the pipeline, choose PostgreSQL as the source and Supabase as the Hosting provider. This page covers what differs on Supabase. For partitioned tables, tables without primary keys and other settings, see the PostgreSQL overview.
Enable a dedicated IPv4 address
Supabase’s direct connection uses IPv6 unless the project has the IPv4 add-on. Artie’s fixed IP addresses are IPv4, so enable the add-on:
In Supabase, open your project’s Settings, then select Add-ons.
Enable Dedicated IPv4 address.
Dedicated IPv4 address is the first add-on on the page:

Supabase connection string
Supabase turns on logical replication by default. To confirm, run this query in your Supabase database:
SHOW wal_level;The query returns logical.
Logical replication doesn’t work through the Supabase connection pooler, so Artie needs the direct connection. Don’t use the transaction pooler on port 6543.
On your project’s home page, open Copy and select Direct connection string:

If the string isn’t a direct connection, select Get Connected, open the Direct tab and set Connection Method to Direct connection. The direct connection uses port 5432:

Create database access
Run this as an admin in your Supabase database. It creates Artie’s user, gives it replication access and grants it read access to current and future tables in public:
CREATE USER artie WITH PASSWORD 'PASSWORD';
ALTER USER artie REPLICATION;
GRANT USAGE ON SCHEMA public TO artie;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO artie;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO artie;Replace PASSWORD with a password for the user. Repeat the three grants for each other schema you want to replicate tables from.
Create the publication
Artie reads changes through a publication named dbz_publication, which you create. Run this as an admin that owns the tables:
CREATE PUBLICATION dbz_publication FOR ALL TABLES WITH (publish_via_partition_root = true);publish_via_partition_root needs PostgreSQL 13 or later. On PostgreSQL 12 or earlier, leave out the WITH clause and turn off Publish via partition root when you connect the source. To use a publication you already have, enter its name in Publication instead.
Connect Supabase in Artie
Create the pipeline in the setup flow:
On Choose your source, select PostgreSQL, then select Continue.
On How would you like to connect your source?, choose SSH tunnel, Allowlist Artie IPs or PrivateLink.
On Prepare your PostgreSQL database, set Hosting provider to Supabase, then select Continue.
On Connect PostgreSQL, enter the values from the direct connection string, listed in the table after these steps.
Select Verify source. When it shows Source verified, select Continue.
If you reuse a PostgreSQL connector that’s already set up, setup passes the network and prepare steps.
Enter these values on Connect PostgreSQL:
| Field | Value |
|---|---|
| Host | The host from the direct connection string, for example db.example.supabase.co |
| Port | 5432 |
| User | artie |
| Password | The password you set for artie |
| Database name | The database your tables are in, postgres in the direct connection string |
Publish via partition root is on by default and must match the publication. Turn it off only if you created the publication without the WITH clause.
Next steps
- PostgreSQL overview: partitioned tables, tables without primary keys and other settings.
- Troubleshoot PostgreSQL: common replication issues and fixes.
- Fixed IP addresses: the addresses to allow when you choose Allowlist Artie IPs.
Was this page helpful?
- Need help? Message us on Slack or email [email protected].
- Want a walkthrough? Book a demo.
- LLM? Read llms.txt.