Skip to content

Commit cd86c71

Browse files
andinuxclaude
andcommitted
docs(postgres): mirror upgrade procedure to self-hosted Supabase quickstart
The "Upgrading a later release" section added to docs/postgresql/quickstarts/postgres.md in 710d48d explains when PATCH releases are transparent binary upgrades vs. when MINOR/MAJOR releases require ALTER EXTENSION cloudsync UPDATE. Supabase self-hosted users run the same extension and face the same decision when moving between image tags, so mirror the section into supabase-self-hosted.md with the phrasing adapted for their workflow: pull sqlitecloud/sqlite-sync-supabase:<tag> and restart the db service, rather than swap the .so on disk. The top-level README "Versioning" section keeps its single link to postgres.md as the canonical reference. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fbc9326 commit cd86c71

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/postgresql/quickstarts/supabase-self-hosted.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,29 @@ docker compose exec db psql -U supabase_admin -d postgres -c "SELECT cloudsync_v
8181

8282
If the extension is installed correctly, PostgreSQL returns the CloudSync version string.
8383

84+
### Upgrading a later release
85+
86+
CloudSync uses the first two components of its semver as the PostgreSQL extension version (for example, `1.0.17` installs as extension version `1.0`). How you upgrade depends on which component changed:
87+
88+
- **PATCH release** (e.g. `1.0.17 → 1.0.18`): pull the matching `sqlitecloud/sqlite-sync-supabase:<tag>` image and restart the `db` service. No SQL-level upgrade is needed — `installed_version` stays at `1.0` and the new binary takes over on reconnect. `SELECT cloudsync_version();` confirms the new semver.
89+
- **MINOR or MAJOR release** (e.g. `1.0.x → 1.1.0`): pull the new image and restart as above, then run once per database:
90+
91+
```sql
92+
ALTER EXTENSION cloudsync UPDATE;
93+
```
94+
95+
PostgreSQL applies any `cloudsync--<from>--<to>.sql` upgrade scripts shipped with the release and moves `installed_version` to the new value.
96+
97+
You can check the current state at any time:
98+
99+
```sql
100+
SELECT name, default_version, installed_version
101+
FROM pg_available_extensions
102+
WHERE name = 'cloudsync';
103+
```
104+
105+
If `installed_version` is behind `default_version` after a release, run `ALTER EXTENSION cloudsync UPDATE;` to catch up.
106+
84107
---
85108

86109
## Step 3: Register Your Database in the CloudSync Dashboard

0 commit comments

Comments
 (0)