From 440f3503f6bdc16125338fcd1f0f0c411ebc45bd Mon Sep 17 00:00:00 2001 From: Kobie Botha Date: Mon, 27 Oct 2025 09:31:04 -0600 Subject: [PATCH] add postgres publication guidance (#278) --- snippets/postgres-powersync-publication.mdx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/snippets/postgres-powersync-publication.mdx b/snippets/postgres-powersync-publication.mdx index 830ab906..883a68db 100644 --- a/snippets/postgres-powersync-publication.mdx +++ b/snippets/postgres-powersync-publication.mdx @@ -1,6 +1,13 @@ + ```sql --- Create a publication to replicate tables. --- Specify a subset of tables to replicate if required. --- The publication must be named "powersync" +-- Create a publication to replicate tables. The publication must be named "powersync" CREATE PUBLICATION powersync FOR ALL TABLES; -``` \ No newline at end of file +``` + + +Note that the PowerSync Service has to read all updates present in the publication's WAL, regardless of whether the table is referenced in your Sync Streams / Sync Rules definitions. This can cause large spikes in memory usage or introduce replication delays, so if you're dealing with large data volumes then you'll want to specify a comma separated subset of tables to replicate instead of `FOR ALL TABLES`. + + + +The snippet above replicates all tables and is the simplest way to get started in a dev environment. + \ No newline at end of file