Sources
PostgreSQL
Configure PostgreSQL as an Artie source.
Required settings
- Host name
- Port (default is
5432) - Service account
- Database with logical replication enabled
- PostgreSQL 10 and later. Publishing partitioned tables via the partition root needs PostgreSQL 13 and later.
Provider specific instructions
When you set up the pipeline in Artie, choose the same provider under Hosting provider on Prepare source. For PlanetScale for Postgres, choose PlanetScale.
Self-hosted and other providers
Run this as a database admin. Repeat the grants for each schema you want to replicate:
CREATE USER artie_transfer WITH PASSWORD 'password';
ALTER USER artie_transfer REPLICATION;
GRANT USAGE ON SCHEMA schema_name TO artie_transfer;
-- Grant access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO artie_transfer;
-- Grant read-only access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name GRANT SELECT ON TABLES TO artie_transfer;
-- publish_via_partition_root needs PostgreSQL 13 or later.
-- On 12 and earlier, drop the WITH clause and turn off "Publish via partition root" in Artie.
CREATE PUBLICATION dbz_publication FOR ALL TABLES WITH (publish_via_partition_root = true);Then set wal_level = logical in postgresql.conf and restart PostgreSQL. Check it:
SHOW wal_level;It should return logical. Otherwise validation fails with please update WAL level from 'replica' to 'logical'.
Additional features
How does Artie support partitioned tables?
Artie will automatically detect partitioned tables and automatically fan data into a single table in your destination.
Can I replicate tables without primary keys?
Yes. Set the table’s replica identity to FULL and configure Override primary keys in Artie using an existing unique index. See Replicate PostgreSQL tables without primary keys for the full procedure.
Can I use logical replication on standby replicas?
Yes, you can use logical replication on standby replicas with some caveats:
- This is only available in PostgreSQL 16 and above.
- This is not available for Amazon Aurora
Steps to enable this:
Create
dbz_publicationpublication on the primary databaseSQLCREATE PUBLICATION dbz_publication FOR ALL TABLES WITH (publish_via_partition_root = true);Turn on
hot_standby_feedbackon the standby, inpostgresql.confor your provider’s parameter group. Then check that it returnson:SQLpostgres> SHOW hot_standby_feedback; hot_standby_feedback ---------------------- onCheck that
wal_levelislogicalon the standby:SQLpostgres> SHOW WAL_LEVEL; wal_level ---------------------- logicalPoint the Artie source’s host at the standby.
Enabling heartbeats
You’ll want to enable heartbeats to prevent your replication slot from overflowing if you have an idle database.
In the pipeline editor, open the Source tab, open Postgres settings, and select Enable heartbeats. When you set up a new pipeline, turn on Heartbeats under Advanced options instead. Then run this once in the database you’re replicating:
CREATE TABLE test_heartbeat_table (id text PRIMARY KEY, ts timestamp);
-- Grant access to the heartbeat table. Replace artie_transfer with your service account.
GRANT SELECT, UPDATE ON TABLE test_heartbeat_table TO artie_transfer;
-- Then insert one row into this table.
-- Artie's periodic pings will be this:
-- UPDATE test_heartbeat_table set ts = now() WHERE id = '1';
-- Such that we never end up adding additional rows.
INSERT INTO test_heartbeat_table (id, ts) VALUES (1, NOW());If your publication mode is Filtered (Specific tables in a new pipeline), add test_heartbeat_table to the publication too. Otherwise validation fails with heartbeat table "test_heartbeat_table" is not part of publication(s) dbz_publication.
Customize publications mode
Don’t want to enable publications to capture all the tables? Set Publication mode to Specific tables when you connect the source in a new pipeline. In the pipeline editor, it’s Source > Postgres settings > Publication mode > Filtered.
If you change this to be filtered, you are responsible for adding and removing any captured tables from the publication. Our validation will check that the publications is configured correctly.

PostgreSQL schema optimization (beta)
Artie can reuse unchanged PostgreSQL relation metadata while processing CDC events, reducing redundant schema lookups. When PostgreSQL sends a changed relation definition, Artie refreshes the metadata before continuing to process records.
To enable this beta feature, open the pipeline editor, select the Source tab, open Postgres settings, and select Enable PostgreSQL schema optimization (beta). It is disabled by default.
This is a source-reader setting. If multiple pipelines share a source reader, enabling it affects every pipeline attached to that reader.
PostgreSQL 17 failover replication slots
Enable Use PostgreSQL 17 failover replication slot in Source > Postgres settings. When you set up a new pipeline, turn on Failover slot under Advanced options instead. Artie creates missing slots with failover support; PostgreSQL 17 or later is required.
Existing slots are unchanged.
TOAST columns
TOAST (The Oversized-Attribute Storage Technique) is a mechanism used by Postgres to store large column values to alleviate the page size limit. TOAST columns may be different data types such as text, jsonb, bytea, array, etc.
One thing that is special about TOAST columns is that if the column value has not changed, the column value will not be included in WAL if the table’s replica identity is set to default. Artie has automatic detection built-in to detect an unchanged TOAST column and will conditionally replicate this into the target database.
Our built-in process will detect if an incoming CDC event has an unchanged TOAST column and will not update the column value in the target database. We are able to do all of this without having to increase your table replica identity.
Monitoring
We have regular monitors that provide additional guardrails around your database replication, and will do the following:
- Replication slot size. Every 10 minutes we check your slot’s size and alert you when it passes 5% of your database size (between 10 GB and 100 GB), or 65% of
max_slot_wal_keep_sizeif that’s lower. - Heartbeats verification. If you turned on heartbeats, we alert you when a heartbeat query fails.
- Idle Artie sessions. We close Artie’s own connections that have been idle for more than a day. We never touch other users’ sessions.
Composite (row) types
By default, Artie stores Postgres composite (row) type columns as Base64 encoded strings. If you’d rather have the human-readable values downstream, you can have Artie replicate them as their text representation (e.g. (book,abc123)) instead.
To turn this on, select “Replicate composite types as text” under the advanced settings on the source tab in the pipeline editor. This setting is off by default, which preserves the existing Base64 behavior.
Questions
Should I enable publications for all tables?
We recommend enabling publications for all tables. This will ensure that you are capturing all the changes to your database and you will not need to manually add and remove tables from the publication.
In the case where you only want to capture a small subset of tables in your database, you may want to enable publications for the specified tables. This will require you to manually manage the publication.
Can we connect to an Aurora read-only endpoint?
We can connect to the read-only endpoint for backfills. However, we will need to connect to the write endpoint to consume from change data capture.
Why didn't a new column appear in my destination after an ALTER TABLE?
DDL changes such as ALTER TABLE ... ADD COLUMN do not appear as discrete events in the PostgreSQL WAL. As a result, Artie cannot detect a schema change the moment it is applied because it has no WAL event to react to.
Instead, Artie uses lazy schema evaluation: when the next CDC event (INSERT, UPDATE, or DELETE) arrives for a table, Artie compares the current source schema against the destination schema and applies any outstanding DDL changes before writing the row.
This means that on a slowly changing table (one that receives infrequent writes), the new column will not appear in the destination until a DML event occurs on that table. Once any row is inserted or updated, Artie will detect the schema drift, add the missing column to the destination, and then apply the change.
If you need the column to appear sooner, you can trigger it manually by inserting or updating a row in the table.