Skip to content

Commit 440f350

Browse files
authored
add postgres publication guidance (#278)
1 parent 6c065eb commit 440f350

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
12
```sql
2-
-- Create a publication to replicate tables.
3-
-- Specify a subset of tables to replicate if required.
4-
-- The publication must be named "powersync"
3+
-- Create a publication to replicate tables. The publication must be named "powersync"
54
CREATE PUBLICATION powersync FOR ALL TABLES;
6-
```
5+
```
6+
7+
<Warning>
8+
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`.
9+
</Warning>
10+
11+
<Warning>
12+
The snippet above replicates all tables and is the simplest way to get started in a dev environment.
13+
</Warning>

0 commit comments

Comments
 (0)