@crvouga/mockingbird-service-postgres 3.4.1 → 3.6.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog — @crvouga/mockingbird-service-postgres
2
2
 
3
+ ## 3.6.0 (2026-10-16)
4
+
5
+ ### Features
6
+
7
+ - resolve SQL, routing and writer gaps ([73f97d0](https://github.com/crvouga/mockingbird/commit/73f97d0d2379f44b9131180498f4fab76648fed9))
8
+
9
+ ## 3.5.0 (2026-10-15)
10
+
11
+ ### Features
12
+
13
+ - finish durable run lifecycle ([725ea1a](https://github.com/crvouga/mockingbird/commit/725ea1a966dac65434e98f06a9c33aca0d6f32d7))
14
+ - add management and portable archives ([0d2a6dd](https://github.com/crvouga/mockingbird/commit/0d2a6dd0f9fecb3a1ea7c1638f6639787395c2f4))
15
+
16
+ ### Fixes and improvements
17
+
18
+ - correlate cross-namespace operations ([3457a4b](https://github.com/crvouga/mockingbird/commit/3457a4b7dbfd9ad9c8a10671a5744b7c8425d000))
19
+ - harden HTTP stream handling ([674307a](https://github.com/crvouga/mockingbird/commit/674307a869f57907567d462c4f506c3b0a237e13))
20
+
3
21
  ## 3.4.1 (2026-10-15)
4
22
 
5
23
  ### Fixes and improvements
package/COMPATIBILITY.md CHANGED
@@ -96,6 +96,9 @@ The oracle exposes **2787 builtin functions** and **74 operators** in `pg_catalo
96
96
  | `COMMENT ON INDEX`, `pg_description`, `obj_description` | VERIFIED | Stored on the index: replace, clear with `NULL` or `''`, removed with the index / table / schema, kept through renames, transactional, in snapshots, isolated per wire transaction; `42P01` / `3F000` / `42809` for a missing index, a missing schema, a relation that is not an index. Comments on every other kind of object are still accepted and not stored (divergence `comment-on-not-stored`) (`tests/contract/catalogs/index-comments.test.ts`) |
97
97
  | `regnamespace`, `to_regnamespace` | VERIFIED | Input (`-`, an all-digit oid, or exactly one identifier, case-folded unless quoted), output (quoted like `quote_ident`, numeric when no schema has the oid, `-` for zero), casts from text / name / oid / integers, implicit use as `oid` in comparisons, `pg_toast` / `pg_catalog` / `information_schema`; `3F000`, `42602` and `22003` as PostgreSQL raises them. `public` has a generated oid, not 2200 (`tests/contract/catalogs/regnamespace.test.ts`) |
98
98
  | `pg_stat_user_tables`, `pg_stat_user_indexes`, `ANALYZE` | PARTIALLY VERIFIED | PostgreSQL 18's columns and types; one row per user table and materialized view (and per index), `relid` joins `pg_class.oid`, follows create / drop / rename / schema moves, restored with snapshots. `n_live_tup` is the exact row count, immediately; `ANALYZE` validates its targets (`42P01`, `42703`, `42701`, `42601`) and records `analyze_count` / `last_analyze` from the database clock. Not tracked (read zero / NULL): scans, tuples inserted / updated / deleted, dead tuples, vacuum; `idx_scan` counts only the unique-key lookups made for `SELECT`. `VACUUM ANALYZE` does not count. Temporary tables are listed under the schema they were created in, not `pg_temp` (divergence `pg-stat-counters-immediate`) (`tests/contract/catalogs/table-statistics.test.ts`) |
99
+ | Storage-default session settings | VERIFIED | `default_tablespace` (empty/database default or `pg_default`) and `default_table_access_method` (`heap`), SHOW/current_setting/set_config/RESET and transaction-local scope. Unknown methods/tablespaces fail with `22023`. Physical storage placement is not modelled (`tests/contract/misc/storage-defaults.test.ts`) |
100
+ | Materialized view indexes | PARTIALLY VERIFIED | Ordinary/partial/unique indexes, creation before population, catalog links, unique enforcement and atomic failure on refresh, snapshot roundtrip. Physical access methods and concurrent refresh are not modelled (`tests/contract/views/materialized-indexes.test.ts`) |
101
+ | Constraint triggers | PARTIALLY VERIFIED | AFTER ROW multi-event triggers, DEFERRABLE INITIALLY DEFERRED/IMMEDIATE, final-state execution at commit, failed-commit rollback, SET CONSTRAINTS and savepoints; definitions survive snapshots, pending events cannot be exported. Uses the existing plpgsql-lite subset (`tests/contract/triggers/deferred.test.ts`, `tests/wire/deferred.test.ts`) |
99
102
  | Triggers (row-level, LANGUAGE sql-expressible) | PARTIALLY VERIFIED | Creation-order firing, `UPDATE OF` ignored, no INSTEAD OF (documented) |
100
103
  | CREATE FUNCTION LANGUAGE sql / plpgsql-lite | PARTIALLY VERIFIED | Scalar + set-returning; plpgsql subset: DECLARE, EXCEPTION WHEN others, CASE, FOR-IN-SELECT, RETURN NEXT |
101
104
  | Text search (tsvector / tsquery / @@ / ts_rank) | PARTIALLY VERIFIED | `simple`-style config; no ispell/synonym dictionaries |
@@ -126,3 +129,15 @@ bun run build # ESM browser build
126
129
  Do not treat isolated unit tests of internal modules as proof of PostgreSQL compatibility. The differential suite is authoritative for SQL behavior; `test:postgres-compat` is the release gate.
127
130
 
128
131
  **Parity claim:** Verified against **PostgreSQL 18.3** (PGlite). Features marked **VERIFIED** are oracle-proven. **PARTIALLY VERIFIED** rows must not be marketed as complete. **NOT APPLICABLE** is the only allowed permanent omission from the SQL drop-in claim.
132
+
133
+ ## Fleet administration and portability
134
+
135
+ The wire fleet adapter supports dynamic isolated namespace listeners, finite numeric seeds,
136
+ boot/reset logical clocks, connection admission limits, private pre-ready initialization listeners
137
+ and bounded read-only inspection of the same wire engine. `mockingbird.postgres/v1` archives carry
138
+ PGMM bytes for every database plus clock, fault and PRNG state, decoded before restoring. Live
139
+ sessions remain a capture/reset conflict. Cross-service latency/fault profiles are rejected for
140
+ PostgreSQL; clock profiles are supported. This adds fleet orchestration around existing SQL and
141
+ snapshot semantics, not a broader SQL compatibility claim. Acceptance evidence is
142
+ `packages/adapters/node/fleet.management.test.ts` using the unmodified `pg` wire client.
143
+ See [Fleets](../../../docs/FLEETS.md).
@@ -4,6 +4,8 @@ const D = "documented_divergence" as const;
4
4
  const REPORT = ["tests/contract/_reports/session-system.md"];
5
5
 
6
6
  export const TRG_SECTION: CatalogSection = section("TRG", "Triggers", true, [
7
+ ["deferred-01", "deferred constraint trigger observes final transaction state"],
8
+ ["deferred-02", "SET CONSTRAINTS IMMEDIATE flushes pending events"],
7
9
  ["bi-01", "BEFORE INSERT trigger assigns a NEW column"],
8
10
  ["bi-02", "BEFORE INSERT trigger computes from another NEW column"],
9
11
  ["bi-03", "BEFORE INSERT returning NULL suppresses the row"],