Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions snippets/postgres-powersync-publication.mdx
Original file line number Diff line number Diff line change
@@ -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;
```
```

<Warning>
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`.
</Warning>

<Warning>
The snippet above replicates all tables and is the simplest way to get started in a dev environment.
</Warning>