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