Logical replication
Connect PowerSync, Debezium, or any change-data-capture tool to your Vorynza database.
Vorynza databases support Postgres logical replication, so you can connect sync engines and change-data-capture (CDC) tools like PowerSync or Debezium directly to your database.
Create a publication
CDC tools read from a Postgres publication, which you create yourself with SQL. The standard form you'll see in most guides is:
CREATE PUBLICATION powersync FOR ALL TABLES;This fails on Vorynza with:
must be rds_superuser to create FOR ALL TABLES publicationYour database role is scoped to your own database, not a full Postgres superuser, so FOR ALL TABLES (and FOR TABLES IN SCHEMA, which has the same requirement) isn't available. Use FOR TABLE with an explicit table list instead, this only needs ownership of the named tables, which
your role already has for everything in your own database.
Run this in the SQL editor (or via psql) to build the publication from every table you
currently own:
DO $$
DECLARE
tbls text;
BEGIN
SELECT string_agg(quote_ident(tablename), ', ')
INTO tbls
FROM pg_tables
WHERE schemaname = 'public';
EXECUTE 'CREATE PUBLICATION powersync FOR TABLE ' || tbls;
END $$;Adding new tables later
FOR TABLE publications don't automatically pick up tables you create afterward, unlike FOR ALL TABLES. Add each new table explicitly:
ALTER PUBLICATION powersync ADD TABLE your_new_table;Connecting your sync tool
Use your standard Vorynza connection string, the same one you'd use for any Postgres client:
postgresql://<username>:<password>@<host>:5432/<database>?sslmode=requirePoint your tool at this connection string and the powersync publication (or whatever name you
gave it above).
Need help connecting? Contact support.
