@powersync/service-module-postgres-storage 0.11.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/migrations/scripts/1771232439485-storage-version.d.ts +3 -0
- package/dist/@types/migrations/scripts/1771424826685-current-data-pending-deletes.d.ts +3 -0
- package/dist/@types/migrations/scripts/1771491856000-sync-plan.d.ts +3 -0
- package/dist/@types/storage/PostgresBucketStorageFactory.d.ts +6 -10
- package/dist/@types/storage/PostgresCompactor.d.ts +10 -3
- package/dist/@types/storage/PostgresSyncRulesStorage.d.ts +5 -3
- package/dist/@types/storage/batch/OperationBatch.d.ts +2 -2
- package/dist/@types/storage/batch/PostgresBucketBatch.d.ts +12 -9
- package/dist/@types/storage/batch/PostgresPersistedBatch.d.ts +17 -5
- package/dist/@types/storage/current-data-store.d.ts +85 -0
- package/dist/@types/storage/current-data-table.d.ts +9 -0
- package/dist/@types/storage/sync-rules/PostgresPersistedSyncRulesContent.d.ts +1 -10
- package/dist/@types/storage/table-id.d.ts +2 -0
- package/dist/@types/types/models/CurrentData.d.ts +18 -3
- package/dist/@types/types/models/SyncRules.d.ts +12 -2
- package/dist/@types/types/models/json.d.ts +11 -0
- package/dist/@types/types/types.d.ts +2 -0
- package/dist/@types/utils/bson.d.ts +1 -1
- package/dist/@types/utils/db.d.ts +9 -0
- package/dist/@types/utils/test-utils.d.ts +1 -1
- package/dist/migrations/scripts/1771232439485-storage-version.js +111 -0
- package/dist/migrations/scripts/1771232439485-storage-version.js.map +1 -0
- package/dist/migrations/scripts/1771424826685-current-data-pending-deletes.js +8 -0
- package/dist/migrations/scripts/1771424826685-current-data-pending-deletes.js.map +1 -0
- package/dist/migrations/scripts/1771491856000-sync-plan.js +91 -0
- package/dist/migrations/scripts/1771491856000-sync-plan.js.map +1 -0
- package/dist/storage/PostgresBucketStorageFactory.js +56 -58
- package/dist/storage/PostgresBucketStorageFactory.js.map +1 -1
- package/dist/storage/PostgresCompactor.js +55 -66
- package/dist/storage/PostgresCompactor.js.map +1 -1
- package/dist/storage/PostgresSyncRulesStorage.js +23 -15
- package/dist/storage/PostgresSyncRulesStorage.js.map +1 -1
- package/dist/storage/batch/OperationBatch.js +2 -1
- package/dist/storage/batch/OperationBatch.js.map +1 -1
- package/dist/storage/batch/PostgresBucketBatch.js +286 -213
- package/dist/storage/batch/PostgresBucketBatch.js.map +1 -1
- package/dist/storage/batch/PostgresPersistedBatch.js +86 -81
- package/dist/storage/batch/PostgresPersistedBatch.js.map +1 -1
- package/dist/storage/current-data-store.js +270 -0
- package/dist/storage/current-data-store.js.map +1 -0
- package/dist/storage/current-data-table.js +22 -0
- package/dist/storage/current-data-table.js.map +1 -0
- package/dist/storage/sync-rules/PostgresPersistedSyncRulesContent.js +14 -30
- package/dist/storage/sync-rules/PostgresPersistedSyncRulesContent.js.map +1 -1
- package/dist/storage/table-id.js +8 -0
- package/dist/storage/table-id.js.map +1 -0
- package/dist/types/models/CurrentData.js +11 -2
- package/dist/types/models/CurrentData.js.map +1 -1
- package/dist/types/models/SyncRules.js +12 -1
- package/dist/types/models/SyncRules.js.map +1 -1
- package/dist/types/models/json.js +21 -0
- package/dist/types/models/json.js.map +1 -0
- package/dist/utils/bson.js.map +1 -1
- package/dist/utils/db.js +41 -0
- package/dist/utils/db.js.map +1 -1
- package/dist/utils/test-utils.js +50 -14
- package/dist/utils/test-utils.js.map +1 -1
- package/package.json +9 -9
- package/src/migrations/scripts/1771232439485-storage-version.ts +44 -0
- package/src/migrations/scripts/1771424826685-current-data-pending-deletes.ts +10 -0
- package/src/migrations/scripts/1771491856000-sync-plan.ts +21 -0
- package/src/storage/PostgresBucketStorageFactory.ts +69 -68
- package/src/storage/PostgresCompactor.ts +63 -72
- package/src/storage/PostgresSyncRulesStorage.ts +30 -17
- package/src/storage/batch/OperationBatch.ts +4 -3
- package/src/storage/batch/PostgresBucketBatch.ts +306 -238
- package/src/storage/batch/PostgresPersistedBatch.ts +92 -84
- package/src/storage/current-data-store.ts +326 -0
- package/src/storage/current-data-table.ts +26 -0
- package/src/storage/sync-rules/PostgresPersistedSyncRulesContent.ts +13 -33
- package/src/storage/table-id.ts +9 -0
- package/src/types/models/CurrentData.ts +17 -4
- package/src/types/models/SyncRules.ts +16 -1
- package/src/types/models/json.ts +26 -0
- package/src/utils/bson.ts +1 -1
- package/src/utils/db.ts +47 -0
- package/src/utils/test-utils.ts +42 -15
- package/test/src/__snapshots__/storage.test.ts.snap +148 -6
- package/test/src/__snapshots__/storage_compacting.test.ts.snap +17 -0
- package/test/src/__snapshots__/storage_sync.test.ts.snap +2211 -21
- package/test/src/migrations.test.ts +9 -2
- package/test/src/storage.test.ts +137 -131
- package/test/src/storage_compacting.test.ts +113 -2
- package/test/src/storage_sync.test.ts +148 -4
- package/test/src/util.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @powersync/service-module-postgres-storage
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8c5bb3b: [Internal] Allow using multiple BucketStorageBatch instances concurrently.
|
|
8
|
+
- c15efc7: [Internal] Track and propagate source on buckets and parameter indexes to storage APIs.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 642cb11: [Postgres Storage] Fix concurrency issue in compacting, leading to "[PSYNC_S1101] Unexpected PUT operation".
|
|
13
|
+
- Updated dependencies [8c5bb3b]
|
|
14
|
+
- Updated dependencies [dcddcf1]
|
|
15
|
+
- Updated dependencies [c15efc7]
|
|
16
|
+
- Updated dependencies [e7152ce]
|
|
17
|
+
- Updated dependencies [e150c5c]
|
|
18
|
+
- Updated dependencies [b410924]
|
|
19
|
+
- @powersync/service-core@1.20.1
|
|
20
|
+
- @powersync/lib-services-framework@0.9.0
|
|
21
|
+
- @powersync/service-sync-rules@0.33.0
|
|
22
|
+
- @powersync/lib-service-postgres@0.4.23
|
|
23
|
+
- @powersync/service-jpgwire@0.21.14
|
|
24
|
+
|
|
25
|
+
## 0.12.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 8a4c34e: Refactor `BucketStorageFactory` and `PersistedSyncRulesContent` to be abstract classes instead of interfaces.
|
|
30
|
+
- 8bd83e8: Introduce storage versions.
|
|
31
|
+
- 83989b2: Store compiled sync plans in bucket storage.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 65f3c89: Improve Postgres compaction performance by replacing bucket range filtering with incremental discovery and per-bucket exact-match queries, eliminating `COLLATE "C"` and `U+FFFF` sentinel usage.
|
|
36
|
+
|
|
37
|
+
- The compactor logic is an internal refactor that improves query performance (no API change)
|
|
38
|
+
- The CLI change adds validation but is a correction (prefix matching was broken/unused anyway)
|
|
39
|
+
- The `CompactOptions.compactBuckets` JSDoc is a documentation-only update
|
|
40
|
+
|
|
41
|
+
Resolves #400.
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [15aea77]
|
|
44
|
+
- Updated dependencies [0998251]
|
|
45
|
+
- Updated dependencies [65f3c89]
|
|
46
|
+
- Updated dependencies [1c45667]
|
|
47
|
+
- Updated dependencies [8785a3f]
|
|
48
|
+
- Updated dependencies [8a4c34e]
|
|
49
|
+
- Updated dependencies [b440093]
|
|
50
|
+
- Updated dependencies [d7ff4ad]
|
|
51
|
+
- Updated dependencies [c683322]
|
|
52
|
+
- Updated dependencies [8bd83e8]
|
|
53
|
+
- Updated dependencies [83989b2]
|
|
54
|
+
- Updated dependencies [79a9729]
|
|
55
|
+
- Updated dependencies [5edd95f]
|
|
56
|
+
- @powersync/lib-service-postgres@0.4.22
|
|
57
|
+
- @powersync/service-jpgwire@0.21.13
|
|
58
|
+
- @powersync/service-core@1.20.0
|
|
59
|
+
- @powersync/service-types@0.15.0
|
|
60
|
+
- @powersync/service-sync-rules@0.32.0
|
|
61
|
+
- @powersync/lib-services-framework@0.8.3
|
|
62
|
+
|
|
3
63
|
## 0.11.2
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|