---
title: "Release 3.2 | SurrealDB"
description: "This small patch for 3.2 makes kNN queries return all k rows while an HNSW index is still folding in a bulk load, and adds an experimental endpoint that…"
url: https://surrealdb.com/releases/3.2
---

# SurrealDB 3.2

[Latest patch: 3.2.6](https://surrealdb.com/releases/3.2#release-3-2-6) [All releases](https://surrealdb.com/releases)

**Patches.** 10 patch releases on the 3.2 line, with the release date and full notes for each below.

**Latest.** 3.2.6, released Oct 18, 2026, is the newest patch release on this line and the first set of notes below.

**Stable.** Ready for production, with every patch's release date and full notes below, newest first.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

Back to top

[Version 3.2.6](https://surrealdb.com/releases/3.2#release-3-2-6)

[Server, HTTP and RPC](https://surrealdb.com/releases/3.2#3-2-6-server-http-and-rpc) [Storage](https://surrealdb.com/releases/3.2#3-2-6-storage) [SurrealDS (Enterprise)](https://surrealdb.com/releases/3.2#3-2-6-surrealds-enterprise) [Vector search and indexes](https://surrealdb.com/releases/3.2#3-2-6-vector-search-and-indexes) [Storage](https://surrealdb.com/releases/3.2#3-2-6-storage-1) [SurrealDS (Enterprise)](https://surrealdb.com/releases/3.2#3-2-6-surrealds-enterprise-1)

[Version 3.2.5](https://surrealdb.com/releases/3.2#release-3-2-5)

[Version 3.2.4](https://surrealdb.com/releases/3.2#release-3-2-4)

[Version 3.2.3](https://surrealdb.com/releases/3.2#release-3-2-3)

[Version 3.2.2](https://surrealdb.com/releases/3.2#release-3-2-2)

[Version 3.2.1](https://surrealdb.com/releases/3.2#release-3-2-1)

[Version 3.2.0](https://surrealdb.com/releases/3.2#release-3-2-0)

[Version 3.2.0-beta.3](https://surrealdb.com/releases/3.2#release-3-2-0-beta-3)

[Version 3.2.0-beta.2](https://surrealdb.com/releases/3.2#release-3-2-0-beta-2)

[Version 3.2.0-beta.1](https://surrealdb.com/releases/3.2#release-3-2-0-beta-1)

[Home](https://surrealdb.com/)

[Releases](https://surrealdb.com/releases)

3.2

This small patch for 3.2 makes kNN queries return all k rows while an HNSW index is still folding in a bulk load, and adds an experimental endpoint that…

[Newer release line available: 3.3 →](https://surrealdb.com/releases/3.3)

Released Oct 18, 2026

## 3.2.6

This small patch for 3.2 makes kNN queries return all `k` rows while an HNSW index is still folding in a bulk load, and adds an experimental endpoint that streams a datastore's whole keyspace. On SurrealDB Enterprise, it stops UNIQUE indexes on SurrealDS accepting concurrent duplicates and brings a restarted SurrealDS node back into its cluster sooner.

## Also new

- **Keyspace export:** We added an experimental `POST /kvexport` endpoint that streams the open datastore's whole keyspace from one snapshot, as a building block for migrating an instance's keyspace. It stays off until the server starts with `--allow-experimental kvexport`, and only a root-level user with the owner role can call it, because the stream carries password hashes and signing keys. ([learn more](https://surrealdb.com/docs/reference/rest-api/http-protocol#kvexport))
- **Quicker rejoins (Enterprise):** When a SurrealDS node restarts, the rest of its group now gets back to serving sooner. In our tests on a three-node cluster, the surviving nodes were serving again in about half the time, and no rejoin repeated its recovery rounds, which one rejoin in four had done before.

## Upgrade notes

- **Rolling upgrades (Enterprise):** You can upgrade a SurrealDS group on 3.2.5 one node at a time, and roll back to 3.2.5 the same way, because 3.2.6 changes neither the wire format nor the on-disk format.
- **From 3.2.4 or earlier:** Follow the 3.2.5 upgrade notes as well, because 3.2.6 carries 3.2.5's one-way change to vector-index data: a node on an earlier 3.2 release fails kNN queries, writes and compaction on a vector index once a newer node has written to it, so upgrade every node of a cluster or SurrealDS group together. ([learn more](https://surrealdb.com/releases/3.2#release-3-2-5))

## All changes

### Server, HTTP and RPC

- `POST /kvexport` streams the keyspace as `application/vnd.surrealdb.kvexport`. It needs the experimental `kvexport` capability: `--allow-experimental kvexport`, or a bare `--allow-experimental`, which turns on every experimental target. `--allow-all` does not turn it on, and `--deny-http kvexport` turns the route off on its own. Only a root-level user with the owner role may call it, and a datastore that keeps version history answers `409 Conflict` unless the request sends `latest_only: true`.

### Storage

- `[Enterprise]` A `VERSION` read on the SurrealDB Enterprise single-node engine is now refused with an error, as on SurrealDS. Until now such a read silently ran at the wrong point in time, either as of 1970 or at a point that garbage collection had already cleared.
- `[Enterprise]` Commit conflicts on the Enterprise single-node engine are now retryable transaction conflicts, where they used to be a non-retryable datastore error, so the engine's query and sequence retries try again and clients see a different error.
- `[Enterprise]` The Enterprise single-node engine now refuses a write up front while disk space is restricted.

### SurrealDS (Enterprise)

- `[Enterprise]` A SurrealDS node that rejoins after a restart reads each peer's transaction outcomes in parallel, and a node that finishes recovery after its peers joins the view they completed instead of starting another view change.

## Bug fixes

### Vector search and indexes

- Fixed HNSW kNN queries returning fewer than `k` rows while compaction folds a bulk load or a `DEFINE INDEX ... CONCURRENTLY` into the graph. On 3.2, `INFO FOR INDEX` still reports the index `ready` while that work runs, but the results are now complete throughout.
- `[Enterprise]` Fixed a DiskANN write on the Enterprise single-node engine going missing from kNN results when its transaction stayed open across two compaction passes. The community RocksDB engine has had this fix since 3.2.5. Such a write can now fail to commit with a retryable `TransactionConflict` (`-32009`).

### Storage

- `[Enterprise]` Fixed the Enterprise single-node engine counting the memory in RocksDB's write buffers twice toward `SURREAL_MEMORY_THRESHOLD`, which made it refuse queries as overloaded too early. 3.2.5 fixed this double count for community builds, and the Enterprise single-node engine gets the fix in this release.

### SurrealDS (Enterprise)

- `[Enterprise]` Fixed two concurrent writes of the same value to a UNIQUE index on SurrealDS both committing, which left duplicates that later made `DEFINE INDEX` or `REBUILD INDEX` fail with "already contains". Duplicates already stored stay until you remove them: find them with a `WITH NOINDEX` query grouped by the indexed fields, fix each pair, then run `REBUILD INDEX`.

## Security

- Dependency updates clear `RUSTSEC-2026-0346` to `RUSTSEC-2026-0349` (`rustls`), `RUSTSEC-2026-0352` (`wasmtime-wasi`), and `RUSTSEC-2026-0353` to `RUSTSEC-2026-0359` and `RUSTSEC-2026-0361` to `RUSTSEC-2026-0364` (`wasmtime`).

Upgrade or install

## Get SurrealDB v3.2.6

Upgrade a Cloud instance from SurrealDB Studio, or copy the command for your platform.

SurrealDB Cloud

macOS

Linux

Windows

Docker

Already installed

Upgrade a Cloud instance to v3.2.6 in four steps:

1. Open [SurrealDB Studio](https://studio.surrealdb.com/current/instances)
2. Select your organisation and instance
3. On the dashboard, select “Upgrade”
4. The instance updates and restarts automatically

[Full install guide](https://surrealdb.com/surrealdb/install)

Released Oct 5, 2026

## 3.2.5

SurrealDB 3.2.5 fixes a `REBUILD INDEX` that never finished on an index written by an earlier release, vector searches that left records out of their results, and vector searches that ran out of memory during a bulk ingest. It also stops RocksDB memory being counted twice, which could make an instance refuse every request, and keeps sequences at their position across an export and import.

A 3.2 datastore upgrades in place, but the upgrade is one-way: an earlier 3.2 binary cannot read some of the data that 3.2.5 writes. Read the upgrade notes below before a rolling upgrade, and rebuild vector indexes afterwards to recover records that the fixed bugs left out of search results.

Items tagged `(Enterprise)` on a heading or `[Enterprise]` on a bullet refer to the SurrealDB Enterprise product. Everything else applies to community.

## Improvements

- `[Storage]` **Removed data is reclaimed in bounded, resumable batches.** Dropping a large namespace, database or index no longer builds one unbounded transaction that could run the server out of memory, and reclaim continues where it stopped after a restart.
- `[Storage]` **Changefeed and live-query cleanup runs in bounded batches.** Expired changefeed and live-query entries are deleted in committed pages rather than in one transaction spanning every database, and a changefeed retention changed during a pass is respected.
- `[Memory]` **Gauges for the memory guard.** Two new gauges show how close an instance is to `SURREAL_MEMORY_THRESHOLD`, and the log line for a refused request names both figures. [Process metrics](https://surrealdb.com/docs/manage/observability/metrics#process---surrealdbprocess)

## Bug fixes

### Indexing

- Fixed `REBUILD INDEX` on an index of any type written by 3.1.0 to 3.1.5 or 3.2.0 spinning at full CPU and never returning.
- Fixed an update or delete leaving a stale entry in a unique or non-unique index when the record's id held an array or object and its index entry was written before 3.1.0.

### Vector search

- Fixed HNSW and DiskANN searches returning fewer than `k` rows, and none at `k=1`, when a record id held a number inside an array or object, such as `chunk:[42, 'intro']`.
- Fixed kNN searches leaving out the tenth and later records that share one identical vector, such as a placeholder or default embedding.
- Fixed a DiskANN write on RocksDB going missing from kNN results when its transaction stayed open across two compaction passes.
- Fixed vector searches during a bulk ingest loading the whole compaction backlog into memory, which could get the process killed with nothing logged. A search that reads more of the backlog than one batch holds now logs a `WARN`, so a compaction backlog is visible before it becomes a memory problem.
- Fixed `REBUILD INDEX` on a vector index failing with a write conflict against background compaction.

### Memory

- Fixed RocksDB memory being counted twice, which could push the tracked total past `SURREAL_MEMORY_THRESHOLD` and make an instance refuse every request while `/health` still returned `200 OK`.

### Schema and sequences

- Fixed a field named with a reserved keyword, such as `function`, making `INFO FOR TABLE`, later `DEFINE FIELD` statements and every write to its table fail. Definitions written by earlier versions are recovered.
- Fixed `INFO FOR DB`, `surreal export`, `REMOVE DATABASE` and `REMOVE NAMESPACE` failing on a database with a table whose name begins with `sq`. An export of such a database stopped before its first table while still returning HTTP 200, so an earlier export of one may be incomplete.
- Fixed `sequence::nextval()` reissuing values already in use after an export and import, `DEFINE SEQUENCE OVERWRITE` needing a restart to take effect, and other nodes missing a sequence reset. `INFO FOR DB STRUCTURE` now shows each sequence's position in a `resume` field, and a draw that races a redefinition or removal fails with a retryable error.

### SurrealDS (Enterprise)

- Fixed a single slow network wait holding off a view change, which could make a cluster unavailable for up to 140 seconds after a routine event such as a rolling restart.

## Security

- A `USE NS` or `USE DB` statement whose argument queries the database, such as `USE DB (SELECT VALUE id FROM anything)`, no longer crashes the server.
- Dependency updates clear `RUSTSEC-2026-0222`, `RUSTSEC-2026-0223`, `RUSTSEC-2026-0268`, `RUSTSEC-2026-0269`, `RUSTSEC-2026-0314` and `RUSTSEC-2026-0316` (`wasmtime`, used by Surrealism), `RUSTSEC-2026-0285` (`rustls`), `RUSTSEC-2026-0258` (`h2`), `RUSTSEC-2026-0202` (`cxx`), `RUSTSEC-2026-0221` (`event-listener`) and `RUSTSEC-2026-0205` (`scc`).
- Surrealism modules can no longer open UDP sockets. Outbound TCP stays limited to the hosts in `allow_net`.
- The `-dev` Docker images are rebuilt on a base image with patched busybox, OpenSSL and wget.

## Upgrade notes

- **Rebuild vector indexes to recover missing records.** A record that a vector index lost before the upgrade stays out of kNN results until the index is rebuilt with [`REBUILD INDEX`](https://surrealdb.com/docs/reference/query-language/statements/rebuild). This covers records whose id holds a number inside an array or object, and the tenth and later records sharing one vector. Rebuild while no records with such ids are being written, because a rebuild can still index a record written during it under the wrong id. Two record ids that differ only in a nested number's type, such as `[1]` and `[1dec]`, still share one index entry after a rebuild, so one of them stays out of kNN results.
- **Rolling upgrades and rollbacks.** An earlier 3.2 binary cannot read the vector-index and reclaim data that 3.2.5 writes. Until every node runs 3.2.5, or after a rollback, an older node fails kNN queries, writes and compaction against a vector index that 3.2.5 has written to, and skips reclaim work that 3.2.5 queued. A 3.2.5 node resolves both.
- **DiskANN writes can return a retryable conflict on RocksDB.** A transaction that writes to a DiskANN index can now fail to commit with `TransactionConflict` (`-32009`) when compaction runs at the same time. An SDK's `.retry()` helper replays it; the server does not retry user transactions. The in-memory, SurrealKV and TiKV engines do not get this fix on 3.2, so a DiskANN write there can still go missing from kNN results when its transaction stays open across two compaction passes. [Errors](https://surrealdb.com/docs/reference/rest-api/errors#error-details)
- **The memory guard trips later, and its log line changed.** RocksDB memory is no longer counted twice, so `SURREAL_MEMORY_THRESHOLD` is reached later than before. A threshold tuned against the old figure is now less conservative, so check it against the new gauges. A refusal now logs `Refusing request: tracked memory is beyond SURREAL_MEMORY_THRESHOLD` on WebSocket and HTTP, replacing `The server is overloaded and is unable to process a WebSocket request`, so an alert matching the old text needs updating. [Process metrics](https://surrealdb.com/docs/manage/observability/metrics#process---surrealdbprocess)
- `[Enterprise]` **Upgrade SurrealDS nodes together.** SurrealDS has no rolling-upgrade window, as on earlier 3.2 releases.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.5 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Aug 3, 2026

## 3.2.4

SurrealDB 3.2.4 is the fourth patch release on the 3.2 line. It fixes a concurrent index build that could never finish on a table taking writes to an indexed field, and adds two bounds on write fan-out: index compaction now drains its queue in bounded batches, and a new opt-in `SURREAL_TRANSACTION_MAX_WRITE_KEYS` limit turns runaway fan-out into a defined, atomic failure. For SurrealDS (Enterprise), view-change messages now carry a compact record manifest with on-demand fetch, alongside three liveness fixes.

v3.2.4 contains no catalog or on-disk layout changes, so you can upgrade in place from 3.2.0 / 3.2.1 / 3.2.2 / 3.2.3. SurrealDS clusters need every node upgraded together - see Breaking changes.

*v3.2.4 is a patch release with 4 improvements and 4 bug fixes on top of 3.2.3.*

## Improvements

- **Bounded index-compaction drain.** The background index-compaction cycle previously read its whole queue in one unbounded scan and deleted every entry in a single transaction, which on a large backlog could produce a transaction big enough to stall a distributed cluster. It now handles at most 10,000 entries per batch, rotates batches across indexes so one continuously-refilling index cannot starve the others, and quarantines an undecodable entry instead of wedging the drain.
- **Optional write-key limit per statement.** A statement's physical write count can far exceed its logical row count, since cascaded deletes, full-text term maintenance and graph-edge cleanup all multiply per-record work. The new `SURREAL_TRANSACTION_MAX_WRITE_KEYS` setting (default `0`, disabled) caps that fan-out: once a statement transaction has buffered the configured number of writes, the next write fails with a query error naming the limit and the transaction rolls back atomically. Enforcement happens at write time rather than at commit, and covers explicit `BEGIN` blocks, client-owned transactions over RPC and the SDKs, and `SIGNUP` / `SIGNIN` / `AUTHENTICATE` clauses; internal maintenance transactions stay unbounded. Distributed deployments should pick a limit their prepare phase can absorb (50k–100k is a reasonable start); single-node and embedded deployments can leave it off.
- **Compact view-change wire (Enterprise).** A view change previously transferred the full record set between replicas, so its messages scaled with both record count and write-set size - large enough at scale to outlast the retry window and livelock the round. Replicas now exchange a compact per-record manifest and fetch only the records they are missing, in byte-budgeted pages (`SURREAL_DS_VIEW_CHANGE_FETCH_PAGE_BYTES`, default 4 MiB). At 30,000 records the leader-bound message shrinks 19.8x, or 105.9x with larger write sets, since the manifest is a constant ~52 B per record regardless of write-set volume. The live record set is now also bounded independently of wall-clock retention.
- **Quieter operational logs (Enterprise).** The admission-drain watchdog's error now backs off with jitter to a 60-second cap instead of repeating on a fixed 5-second cadence, and a drain that completes after escalating logs one warning with the total wait, so the episode closes. The live read-establishment catch-up's transaction-manifest collection drops from info to debug.

## Bug fixes

### Indexing

- Fixed a concurrent index build (`DEFINE INDEX … CONCURRENTLY`, `REBUILD INDEX`) making no progress on a table that takes writes mutating an indexed field. The builder and the admitted writes contended on the same internal counter, so any write committing inside a build batch discarded that whole batch and the initial scan never committed anything. The build's ownership lease could also expire while its task was still running, leaving it open to a takeover that resumed from zero. Note that a `CONCURRENTLY` build or `REBUILD INDEX` should not be started or left running across a version change in either direction - rebuild the index if one did.

#### SurrealDS (Enterprise)

- **Read starvation after a scale-up.** Fixed a node that was healthy on the current view but on a stale membership epoch having its transaction-begin requests silently dropped by its peers, so its begin quorum never formed and it served no reads while nothing knocked it out of normal operation. The re-sync that repairs the fence now has its own budget (`SURREAL_DS_FENCED_RESYNC_BUDGET_MS`, default 5,000 ms), and sustained unhealed fencing forces a local view change after `SURREAL_DS_FENCED_VIEW_CHANGE_ESCALATION_MS` (default 60,000 ms; `0` disables it).
- **Forfeited backup-recovery evidence rounds.** The backup coordinator's recovery evidence poll sent its request to each replica once per round with no retransmission, so a single lost datagram forfeited the round and parked the termination on a backoff ladder. The poll now retransmits to replicas that have not yet responded, within the same window.
- **Stacked repair escalations.** Fixed stale-tentative repair escalations piling up behind an admission drain: because the replica stays in normal operation for the whole wait, every later escalation passed the same pre-check, flooding the logs and firing a spurious recovery and view change after each completed recovery. At most one such escalation is now pending or in progress at a time, and one whose evidence was resolved while it waited stands down.

## Breaking changes

Catalog and KV on-disk layouts are unchanged from 3.2.0 / 3.2.1 / 3.2.2 / 3.2.3, so single-node and embedded deployments can upgrade in place. The item below affects SurrealDS clusters only.

### SurrealDS view-change messages changed shape (Enterprise)

The compact view-change wire above uses new message variants that a pre-3.2.4 node cannot decode, so a mixed-version cluster cannot complete a view change while an upgrade is in progress. Upgrade every node together. SurrealDS has no rolling-upgrade window, so this matches the existing upgrade posture rather than adding a new constraint.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.4 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jul 21, 2026

## 3.2.3

SurrealDB 3.2.3 is the third patch release on the 3.2 line. It is a focused round of fixes: root- and namespace-level bearer signin now dispatches correctly through the public entrypoint, and `DEFINE PARAM` permission predicates that dereference the authenticated record (for example `$auth.admin`) resolve correctly instead of erroring. For SurrealDS (Enterprise), it fixes a view-change livelock that could stall a cluster whose recovery rounds legitimately outlast the retry timer, and makes the retry window configurable.

v3.2.3 contains no catalog or on-disk layout changes, so you can upgrade in place from 3.2.0 / 3.2.1 / 3.2.2.

*v3.2.3 is a patch release with authentication and permission fixes, plus a SurrealDS (Enterprise) view-change liveness fix, on top of 3.2.2.*

## Bug fixes

### Authentication & permissions

- **Root and namespace bearer signin.** Bearer (and access-method) signin now routes correctly for root- and namespace-level access through the public `signin()` entrypoint, not only through the level-specific helpers, so a client sending `{ [ns], ac, key }` signs in as expected.
- **`DEFINE PARAM` permissions that read `$auth`.** A `DEFINE PARAM` whose `PERMISSIONS` predicate dereferences the authenticated record (for example `$auth.admin = true`) now evaluates under a database context, matching `DEFINE FUNCTION`. Permitted params resolve correctly, and a denied param returns a proper permission error instead of a misleading `DatabaseEmpty` error.

#### SurrealDS (Enterprise)

- **View-change livelock (Enterprise).** Fixed a livelock where a view-change round whose records-bearing transfer and merge legitimately outlasted the retry timer was repeatedly invalidated by participants' own timers, stalling the cluster at timer cadence. The retry timer's escalation is now progress-gated - it defers the view bump while a round demonstrably advances - with a view-gap backoff covering the signal-less transfer phase. The retry window is now configurable via `SURREAL_DS_VIEW_CHANGE_RETRY_MIN_MS`, `SURREAL_DS_VIEW_CHANGE_RETRY_MAX_MS`, and `SURREAL_DS_VIEW_CHANGE_BACKOFF_CEILING_MS`.

## Breaking changes

None - catalog and KV on-disk layouts are unchanged from 3.2.0 / 3.2.1 / 3.2.2, so you can upgrade in place.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.3 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jul 21, 2026

## 3.2.2

SurrealDB 3.2.2 is the second patch release on the 3.2 line. It hardens the RPC layer - opt-in durable RPC sessions (KV-backed with TTL expiration on the HTTP transport) and bounded, self-cleaning WebSocket transactions - alongside fixes to committed live-query cache keying, transaction-conflict reporting, and index-build resilience under shutdown and memory pressure. For SurrealDS (Enterprise), it also fixes a recovery livelock and a missed-phantom case in OCC range validation.

v3.2.2 contains no catalog or on-disk layout changes, so you can upgrade in place from 3.2.0 / 3.2.1.

*v3.2.2 is a patch release with RPC session and transaction improvements, a round of engine bug fixes, and SurrealDS (Enterprise) recovery and concurrency fixes, on top of 3.2.1.*

## Improvements

- **Durable RPC sessions (opt-in).** RPC sessions can now be made durable so they persist beyond a single connection, enabled opt-in at the protocol level (`RpcProtocol`). On the stateless HTTP transport, durable sessions are KV-backed and expire via a TTL, so an HTTP session is persisted and reclaimed reliably instead of living only in a single node's memory.
- **Bounded, self-cleaning WebSocket transactions.** Client-managed transactions over the WebSocket RPC are now bounded and cleaned up automatically, so an abandoned client transaction no longer lingers holding resources.

## Bug fixes

### Query engine

- Fixed committed live-query cache keying so live queries are keyed correctly.
- Fixed `TransactionConflict` error-kind preservation, so a transaction conflict is surfaced as a conflict rather than being flattened into a generic error.

#### Indexing

- Hardened concurrent index builds against node shutdown and memory pressure, so an interrupted build cleans up and rescans rather than leaving a partial index behind.

#### SurrealDS (Enterprise)

- **Recovery livelock (Enterprise).** Fixed a livelock during recovery that could prevent a SurrealDS node from making progress.
- **OCC range validation (Enterprise).** Fixed a missed-phantom case in optimistic-concurrency-control range validation, tightening isolation correctness for range reads.

## Breaking changes

None - catalog and KV on-disk layouts are unchanged from 3.2.0 / 3.2.1, so you can upgrade in place.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.2 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jul 10, 2026

## 3.2.1

SurrealDB 3.2.1 is the first patch release on the 3.2 line. It fixes a batch of streaming-executor parity gaps (numeric-index `FETCH`, idiom recursion limits, indexed `COUNT`), a GraphQL input-coercion regression, `FLEXIBLE` field handling, and an in-memory backend that never reclaimed superseded versions - alongside two fixes from SurrealDB's internal security review.

v3.2.1 contains no catalog or on-disk layout changes, so you can upgrade in place from 3.2.0. The security fixes are enabled by default and we recommend all users on the 3.2 line upgrade.

*v3.2.1 is a patch release with 2 security fixes, 7 bug fixes, and a round of performance and stability work on top of 3.2.0.*

## Improvements

- **Faster cosine HNSW index builds.** Stored-vector norms are now cached during HNSW construction, giving roughly a 2.2x speed-up when building cosine-distance vector indexes.
- **Faster full-text `OR`-in-`AND` queries.** A full-text `OR`-of-matches nested inside an `AND` is now driven from a multi-index full-text union (`UnionIndexScan` over the `FullTextScan` branches) instead of driving from a non-full-text equality index and re-checking the `OR` as a per-row filter.
- **Resumable concurrent index builds.** Concurrent index builds now persist an initial-scan continuation checkpoint and yield cooperatively, so a same-generation takeover resumes the scan from where it stopped instead of wiping the partial index and rescanning from scratch.

## Bug fixes

### Query engine

- Fixed the in-memory backend never reclaiming superseded MVCC versions and delete tombstones on non-versioned (zero-retention) datastores. The background GC worker - the only place the in-memory engine reclaims old versions - was disabled whenever retention was zero, so memory grew unbounded on write/delete-heavy workloads; it now runs unless versioning is enabled with unlimited retention. A misleading versioning/retention startup log was corrected at the same time.
- Fixed index-backed `COUNT` / keys-only scans returning wrong counts when the `WHERE` clause had multiple conjuncts. Such a scan is now only used when the index answers the whole `WHERE` clause, rather than counting a single index branch and dropping the other `AND` conjuncts (or summing overlapping `OR` branches).
- Fixed `FETCH` with a numeric array index (for example `FETCH refs[0]`) silently fetching nothing on the streaming executor. Positive in-range indices are now fetched correctly, while negative and out-of-range indices skip the fetch as expected.
- Fixed the `collect`, `path`, `shortest`, and `repeat` recursion strategies silently truncating instead of raising the idiom recursion limit error when an unbounded recursion exhausts the system limit, matching the `default` strategy and the legacy engine. An explicit user bound equal to the system limit still stops silently.

#### Schema

- `FLEXIBLE` on a `DEFINE FIELD` is now applied to every object shape a field can take - nested literal objects, an `object` wrapped in an `array` or `option`, and an `object` inside an `either` union - and is propagated to auto-generated nested field kinds. `FLEXIBLE` on a type that contains no object is now rejected at definition time rather than silently having no effect.

#### GraphQL

- Fixed GraphQL input strings being re-parsed as SurrealQL, which turned numeric- or time-looking values such as `"9000"` or `"10:00"` into non-string values and broke coercion against `TYPE string`. Input strings inside `object`-typed fields are now kept verbatim; only genuine `datetime` / `duration` / `uuid` formats are still coerced.

#### MCP

- Fixed the HTTP `/mcp` endpoint rejecting requests with `403 Forbidden: Host header is not allowed` when served on a non-loopback hostname. The `Host`-header allowlist is now configurable via `SURREAL_MCP_ALLOWED_HOSTS` (a comma-separated list that replaces the loopback default) and `SURREAL_MCP_ALLOW_ALL_HOSTS` (an escape hatch for deployments behind a trusted proxy). The default remains loopback-only.

## Security

This release addresses two issues surfaced through SurrealDB's internal security review process. The fix for each ships in `v3.2.1` and is enabled by default.

- **Argon2 `PASSHASH` exposed via `INFO`** **High** - `INFO FOR ROOT` / `NS` / `DB` and `INFO FOR USER` leaked each user's stored Argon2 password hash, which is offline-crackable and directly replayable. The hash is now redacted to `[REDACTED]` on the `INFO` / RPC read surface. The privileged `surreal export` path is intentionally unaffected, so hash-preserving exports still round-trip.
- **KNN `SELECT` permission bypass on the streaming executor** - A KNN / ANN query with a pushed-down `WHERE` filter did not apply the table's per-candidate `SELECT` permission inside the ANN search on the streaming executor, letting a record user probe restricted fields by crafting a `WHERE` and observing the result count, order, or timing. The per-candidate permission gate is now enforced during the search, matching the legacy engine, so hidden rows are skipped before the condition can observe them.

## Breaking changes

Catalog and KV on-disk layouts are unchanged from 3.2.0, so you can upgrade in place. The item below is a **behaviour change** that can affect tooling relying on the previous output.

### `INFO` no longer returns user password hashes

As part of the `PASSHASH` redaction fix above, `INFO FOR ROOT` / `NS` / `DB` and `INFO FOR USER` now return `[REDACTED]` in place of the stored Argon2 hash. If you have tooling that read the real hash from `INFO` output, use the privileged `surreal export` path instead, which continues to preserve the actual hash.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.1 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jul 2, 2026

## 3.2.0

SurrealDB 3.2.0 is the second minor release on the 3.0 line. It opens up an entirely new query surface - experimental ISO GQL (Cypher Query Language, OpenGQL) graph querying - and makes every graph query surface reachable beyond its HTTP route, while continuing the query-engine and scan-path performance work started in 3.1.

It also adds a faster and safer server startup path with a dedicated `/ready` probe, a background reaper that takes large `REMOVE NAMESPACE` / `DATABASE` / `INDEX` operations off the request path, write-time enforcement of a typed `id` field, and capability-gated nested query evaluation with `eval::surql` / `eval::gql`.

The 3.1 → 3.2 catalog and on-disk layouts are unchanged, so existing 3.1.x deployments can upgrade in place. A few behaviours and defaults have been tightened - notably write-time `id` typing, read-only view tables, and side-effect-free permission predicates - see Breaking changes for details.

*v3.2.0 is the first stable release on the 3.2 line, landing 7 headline features, a further round of query-engine performance work, and 4 new security fixes, on top of everything already shipped across the 3.1.x patch series.*

## Highlights

### 🕸 Experimental ISO GQL (Cypher Query Language, OpenGQL) querying

A first cut of standards-track [ISO GQL (Cypher Query Language)](https://www.iso.org/standard/76120.html) graph querying lands as an experimental feature, built as a self-contained pipeline in `surrealdb-core` (`opengql`) with its own lexer, parser, and AST. A lowering stage compiles parsed GQL directly onto SurrealDB's internal execution plan - reads become a binding-table plan and mutations run through the native document pipeline - so GQL runs on the same streaming engine as SurrealQL with no SurrealQL text generated or re-parsed.

- Queries are sent over a new `POST /gql` HTTP route or the new `gql` RPC method.
- The language is gated behind the `opengql` experimental capability and is off by default. Enable it with `--allow-experimental opengql` (or `SURREAL_CAPS_ALLOW_EXPERIMENTAL=opengql`).
- **`MATCH` execution (v2).** Pattern matching runs through a `MatchPlan` binding-table executor that supports multi-pattern joins, `OPTIONAL MATCH`, and per-path traversal rather than a single fused chain.
- **Aggregates and `GROUP BY`.** `count`, `sum`, `collect`, `min`, `max`, and `avg` are supported, with grouping.
- **Path search.** `SHORTEST`, `ALL`, and `ANY` path search are available, along with path modes on `MATCH`.
- **Data mutations.** The surface is no longer read-only: `INSERT`, `SET`, `REMOVE`, and `DELETE` let a single GQL query read and write in one transaction. A query is a linear program - an ordered sequence of `MATCH` / `OPTIONAL MATCH` reads and data-modifying statements in any interleaving, optionally ending in a `RETURN` - and a `MATCH` after a mutation re-scans the live, post-write state in the same transaction.
  - **`SET`** sets a property (`SET a.p = v`) or replaces all user properties (`SET a = {…}`, a `CONTENT`-style replace). A record's `id`, and an edge's `in`/`out`, are preserved and cannot be reassigned; `SET a:Label` is rejected because a record belongs to exactly one table.
  - **`REMOVE`** unsets a property (`REMOVE a.p`); `REMOVE a:Label` is rejected.
  - **`DELETE`** removes a matched node or edge. `NODETACH` (the ISO default) errors if the node still has connected edges; `DETACH DELETE` cascades them.
  - **`INSERT`** creates new nodes and edges, e.g. `INSERT (a:Label {…})-[:Edge {…}]->(b:Label {…})`.
- Mutations execute through SurrealDB's native document pipeline (the same one `CREATE` / `UPDATE` / `DELETE` / `RELATE` use), so record- and field-level permissions, field validation, events, indexes, references, and live-query notifications all apply.

This is an early, experimental surface - expect it to keep evolving.

### 🔌 GraphQL and OpenGQL over RPC and MCP

The graph query surfaces are now reachable beyond their HTTP routes.

- Added a `graphql` RPC method, so GraphQL queries can be issued over the WebSocket/RPC protocol instead of only the `/graphql` HTTP endpoint.
- Both GraphQL and OpenGQL are now exposed through the first-party MCP server, letting MCP clients run graph queries directly.

### 🧩 Nested query evaluation with `eval::surql` and `eval::gql`

New built-in functions evaluate a runtime query string inside the caller's transaction, behind a dedicated, deny-by-default capability.

- `eval::surql("…")` evaluates a SurrealQL string and returns a single value (wrap multiple statements in a `{ … }` block so `LET` bindings thread across them and the final value is returned); `eval::gql("…")` evaluates an ISO GQL (Cypher Query Language) string and additionally inherits the `opengql` experimental gate.
- Both are governed by a new eval-query capability, exposed as `--allow-eval-query` / `--deny-eval-query`, which takes one or more subject classes (`guest`, `record`, `system`, or `*`). For example: `--allow-eval-query system`.
- The capability is **denied for every subject by default and is not turned on by `--allow-all`** - it must be enabled explicitly. Because an `eval` call is itself an arbitrary query, it must also pass the existing arbitrary-query gate, so eval can never grant more query power than the front door already allows.
- eval rejects transaction-control and session-level top-level statements (`BEGIN` / `CANCEL` / `COMMIT` / `USE` / `LIVE` / `KILL` / `OPTION` / `SHOW` / access), bounds nesting depth, and honours protected parameter names for caller bindings.

### 🚀 Faster, safer server startup

`surreal start` now separates "the listener is up" from "the datastore is ready to serve", which makes startup behave well behind orchestrators like Kubernetes.

- The HTTP/WS listener is bound **before** the startup import runs, and the startup import runs concurrently rather than blocking the bind.
- A new `/ready` endpoint reports readiness: it returns `200` only once the deferred startup import has finished and the node's cluster heartbeat is fresh; otherwise it returns `503` (or `500` if the heartbeat can't be read).
- While the instance is still starting up, user-facing endpoints return `503`, but `/`, `/status` (liveness), `/health` (backend reachability), `/version`, `/metrics`, and `/ready` stay reachable so probes and scrapers keep working throughout startup.

### 🧹 Background reaper for `REMOVE NAMESPACE` / `DATABASE` / `INDEX`

Large structural removals no longer reclaim their data inline on the statement's transaction.

- `REMOVE NAMESPACE`, `REMOVE DATABASE`, and `REMOVE INDEX` now delete only the catalog definition and enqueue the orphaned data prefix; a background reaper destroys the data out-of-band. This keeps the removing statement fast and bounded regardless of how much data the namespace / database / index held.
- The reaper honours a snapshot-safety grace period before physically reclaiming data, so read transactions whose snapshot predates the `REMOVE` can finish first. On TiKV this is coordinated with the MVCC GC safepoint - the effective grace is `max(reclaim_grace, tikv_gc_lifetime)`, so raising the GC lifetime alone can never make reclaim unsafe.
- New configuration:
  - `--reclaim-interval` / `SURREAL_RECLAIM_INTERVAL` (default `60s`) - how often the reaper runs.
  - `--reclaim-grace` / `SURREAL_RECLAIM_GRACE` (default `10m`) - minimum age before tombstoned data is physically reclaimed.

### 🆔 Typed `id` enforced at write time

`DEFINE FIELD id` is now a first-class typed field that is validated when records are written.

- A `TYPE` on the `id` field is enforced at write time: creating a record whose id does not match the declared type fails with a coercion error (for example, an `int` id field rejects `badtype:notanint`).
- `DEFAULT` on the `id` field is supported and is evaluated against the session and coerced to the declared kind (for example `TYPE uuid DEFAULT rand::uuid()`), but `DEFAULT ALWAYS` is rejected because an explicit id must always win.
- An explicitly supplied id (via the target record id or the data clause) always takes precedence over the `DEFAULT`.
- `ASSERT` on the record `id` field is enforced again, including via `ALTER FIELD`.

### ⚡ Query-engine and scan-path performance

3.2 continues the executor performance work from 3.1, focused on the scan and graph-traversal hot paths.

- **Graph-traversal predicate pushdown.** `WHERE` filters on graph traversals are pushed into `GraphEdgeScan`, so constrained `->edge->vertex` walks filter during the scan instead of materialising and filtering afterwards.
- **Pre-decode scan filter improvements.** The pre-decode filter now peeks record headers slice-directly in its wire comparator, uses a fused slice-direct opener for the record data field, and pre-encodes fused-clause needle wire to drop a per-row allocation.
- **`DELETE`** skips the reference purge scan entirely when the schema proves no references can exist.
- **Filtered kNN** queries cut record I/O via batching, bounded prefetch, and missing-record skipping.
- **TopK threshold pushdown** skips record decode for rows that fall below the `ORDER BY` + `LIMIT` heap threshold.
- **Zero-copy table scans** via a per-row visitor (`for_each`) on the KV layer, and sort keys are extracted once per row instead of being recomputed per comparison.
- **`TCP_NODELAY`** is enabled on the HTTP/WS listener to disable Nagle's algorithm.

## Improvements

- **`DEFINE ANALYZER ... FUNCTION` hardening.** Tightened the function-backed analyzer path: SurrealML model functions are rejected, Surrealism module (`mod::`) functions require the `surrealism` experimental capability, the `FUNCTION` clause expects a function name rather than a function call (`fn::some`, not `fn::some()`), and the analyzer function is validated to return a string.
- **Resumable index builds.** Index builds orphaned by a crashed or lease-expired owner node are now resumed by another node, so an interrupted build no longer stalls indefinitely.
- **DiskANN pending-key sharding.** DiskANN pending keys are now sharded to remove a scan hotspot on the vector index, and the `diskann` dependency was upgraded to `0.54.0`.
- **Configurable full-text doc-ids batch size.** The batch size used to allocate sequence-based document IDs for the concurrent full-text index is now configurable via `SURREAL_FTS_DOC_IDS_BATCH_SIZE` (default `1000`); larger batches reduce ID-allocation coordination between nodes.
- **Orphaned LIVE query metric.** A new counter tracks orphaned `LIVE SELECT` registrations, making it easier to spot live queries that have lost their owning session.
- **Surrealism version in the CLI.** A new `surreal module version` subcommand reports the Surrealism (WASM plugin) runtime version, separate from `surreal version` which continues to report the SurrealDB server version.
- **`[$]` (last element) on sets.** Sets now support the `[$]` last-part accessor, matching arrays.
- **`SHOW CHANGES` surfaces delete pre-images.** With `INCLUDE ORIGINAL`, the change feed now includes the pre-image of deleted records in `SHOW CHANGES` output.
- **`record::exists()` and `LIMIT 0` cleanups.** `record::exists()` now always returns a boolean, returning `false` for a record on an undefined table instead of erroring. Separately, `SELECT ... LIMIT 0` no longer short-circuits the table-existence check: it now behaves like the same query without `LIMIT 0` (for example, erroring on a nonexistent table in strict mode) rather than returning an empty array.
- **Improved performance for large SurrealDS clusters (Enterprise).** Improved performance for SurrealDS clusters larger than 5 nodes.
- **Dependency updates.** `wasmtime` / `wasmtime-wasi` advanced to 46.0.1 and `ammonia` / `anyhow` were bumped, clearing a batch of RustSec advisories (`RUSTSEC-2026-0182`, `-0188`, `-0190`, `-0193`); the Surrealism crate versions were also bumped.

## Bug fixes

- `[Query Engine]` Fixed a duplicate edge record id that could be produced during graph operations.
- `[Query Engine]` View (computed `AS SELECT`) tables are now read-only - direct `CREATE` / `INSERT` / `UPDATE` / `UPSERT` / `RELATE` / `DELETE` against a view table is rejected rather than silently corrupting the materialized view.
- `[Query Engine]` Fixed collect recursion with a minimum depth greater than 1 losing nodes revisited within range in cyclic graphs.
- `[Schema]` Restored enforcement of `ASSERT` on the record `id` field, including via `ALTER FIELD`, so assertions declared on `id` are applied at write time again.
- `[Functions]` `duration::secs`, `duration::millis`, `duration::micros`, and `duration::nanos` no longer overflow to incorrect (often negative) values for very large durations. Integer-to-number conversions that exceed a signed 64-bit integer are now stored as `decimal` instead of being silently truncated, and values too large for `decimal` raise an error rather than wrapping.
- `[Access]` Reject `DURATION FOR TOKEN NONE` on `TYPE RECORD` access (via both `DEFINE` and `ALTER`), since record-access tokens can be consumed by third parties and must have an expiration.
- `[Define API]` Reject duplicate methods in `DEFINE API`, whether declared across separate `FOR` clauses or within a single one.
- `[KV/TiKV]` Fan multi-get results to every position of a duplicate key, so a batched lookup that contains the same key more than once now fills each slot correctly.
- `[KV/TiKV]` Treat the TSO physical component as milliseconds rather than microseconds when interpreting timestamps.
- `[Config]` Fixed the `memory_threshold` configmap parse path rejecting human-readable byte suffixes (for example `256m` or `1g`) and emitting a spurious configuration-parse warning; the configmap path now shares the same suffix-aware helper as the environment-variable path.

## Security

This release addresses a set of issues surfaced through SurrealDB's internal security review process and external reviewers. The fix for each ships in `v3.2.0` and is enabled by default. In addition to the items below, the 3.2 line carries every security fix already shipped across the `v3.1.1`–`v3.1.5` patch series.

- **Cross-tenant custom API access bypass** **High** - [GHSA-848m-r628-vrxw](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-848m-r628-vrxw)
- **Malformed SurrealML file import can panic and terminate the server process** **Moderate** - [GHSA-jwr6-6444-28xv](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-jwr6-6444-28xv)
- **Side effects in `PERMISSIONS` predicates allow writes without permission** **Moderate** - [GHSA-66r2-5gwj-gxm2](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2)
- **JWKS network-capability bypass via an allowed hostname resolving to a private IP (SSRF)** **Moderate** - [GHSA-5x4x-2946-qr67](https://github.com/surrealdb/surrealdb/security/advisories/GHSA-5x4x-2946-qr67)

## Breaking changes

Catalog and KV on-disk layouts are unchanged from 3.1.x, so you can upgrade in place. The items below are **behaviour or default changes** that can affect clients or SurrealQL that relied on previous semantics. The 3.2 line also inherits the breaking changes introduced across the 3.1.x patch series (notably file access now being denied by default unless `file_allowlist` is configured).

### Typed `id` is enforced at write time

If you have a `DEFINE FIELD id` with a `TYPE`, writes whose record id does not match the declared type are now rejected with a coercion error. Records created before this change are unaffected on read, but inserts / updates that previously slipped through with a mismatched id type will now fail. Review any `DEFINE FIELD id` definitions to confirm the declared type matches the ids you actually write.

#### View tables are read-only

Direct writes (`CREATE` / `INSERT` / `UPDATE` / `UPSERT` / `RELATE` / `DELETE`) to a computed `DEFINE TABLE … AS SELECT …` view table are now rejected rather than silently corrupting the materialized view. If you have code that wrote directly to a view table, it will now return an error.

#### `PERMISSIONS` predicates must be side-effect free

As part of the fix for GHSA-66r2-5gwj-gxm2, a stored `PERMISSIONS … WHERE` clause can no longer perform data-modifying statements. Clauses containing a direct write are rejected at `DEFINE` time, and writes reached indirectly (for example through a called function body) are blocked at query time. Read-only predicates, read-only helper-function calls, and read-only subqueries are unaffected.

#### OpenGQL is experimental and opt-in

The new `/gql` route, `gql` RPC method, and `eval::gql` are gated behind the `opengql` experimental capability and are disabled by default. The surface is expected to keep changing and should not be relied on in production. Likewise, `eval::surql` / `eval::gql` are gated behind the deny-by-default eval-query capability and are not enabled by `--allow-all`.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.0 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jul 1, 2026

## 3.2.0-beta.3

PRE-RELEASE

This is the third beta in the 3.2 series. It extends the experimental ISO GQL (Cypher Query Language) surface with data mutations, adds a new capability-gated way to evaluate nested queries from within a function, and rolls up a round of stability, correctness, and dependency updates.

Everything introduced in `v3.2.0-beta.1` and `v3.2.0-beta.2` - experimental ISO GQL (Cypher Query Language, OpenGQL) querying, GraphQL/OpenGQL over RPC and MCP, the faster and safer server startup path, the background reaper for large `REMOVE` operations, write-time enforcement of a typed `id` field, and the query-engine performance work - is included in this build and is not repeated here.

## Highlights

### GQL mutations for OpenGQL (INSERT / SET / REMOVE / DELETE)

The experimental ISO GQL (Cypher Query Language) surface, previously read-only, now supports the four ISO data-modifying statements, so a single GQL query can read and write in one transaction.

- A query is now a linear program: an ordered sequence of `MATCH` / `OPTIONAL MATCH` read clauses and data-modifying statements in any interleaving, optionally ending in a `RETURN`. The binding table threads through every step in textual order, and a `MATCH` after a mutation re-scans the live (post-write) state in the same transaction.
- **`SET`** sets a property (`SET a.p = v`) or replaces all user properties (`SET a = {…}`, a `CONTENT`-style replace). The record `id`, and an edge's `in`/`out`, are preserved and cannot be reassigned; `SET a:Label` is rejected because a record belongs to exactly one table.
- **`REMOVE`** unsets a property (`REMOVE a.p`); `REMOVE a:Label` is rejected.
- **`DELETE`** removes a matched node or edge. `NODETACH` (the ISO default) errors if the node still has connected edges; `DETACH DELETE` cascades them.
- **`INSERT`** creates new nodes and edges, e.g. `INSERT (a:Label {…})-[:Edge {…}]->(b:Label {…})`. A leading `INSERT` runs once; with a preceding `MATCH` it runs once per binding row.
- Mutations execute through SurrealDB's native document pipeline (the same one `CREATE`/`UPDATE`/`DELETE`/`RELATE` use), so record- and field-level permissions, field validation, events, indexes, references, and live-query notifications all apply. A mutation-only query (no `RETURN`) returns an empty result; with a `RETURN`, projected bindings reflect the post-mutation state (a deleted binding becomes `null`).
- This remains part of the experimental, `opengql`-gated surface, reachable over the same `/gql` HTTP route and `gql` RPC method.

### Nested query evaluation with `eval::surql` and `eval::gql`

New built-in functions evaluate a runtime query string inside the caller's transaction, behind a dedicated, deny-by-default capability.

- `eval::surql("…")` evaluates a SurrealQL string (statements are wrapped in a block, so `LET` bindings thread across them and the final value is returned); `eval::gql("…")` evaluates an ISO GQL (Cypher Query Language) string and additionally inherits the `opengql` experimental gate.
- Both are governed by a new eval-query capability, exposed as `--allow-eval-query` / `--deny-eval-query`, which takes one or more subject classes (`guest`, `record`, `system`, or `*`). For example: `--allow-eval-query system`.
- The capability is **denied for every subject by default and is not turned on by `--allow-all`** - it must be enabled explicitly. Because an `eval` call is itself an arbitrary query, it must also pass the existing arbitrary-query gate, so eval can never grant more query power than the front door already allows. The eval subject is derived from the current execution auth, so a record-scoped caller invoking an owner-defined function that calls `eval` is still treated as `record`.
- eval rejects transaction-control and session-level top-level statements (`BEGIN`/`CANCEL`/`COMMIT`/`USE`/`LIVE`/`KILL`/`OPTION`/`SHOW`/access), bounds nesting depth, and honours protected parameter names for caller bindings.

## Improvements

- **Resumable index builds.** Index builds orphaned by a crashed or lease-expired owner node are now resumed by another node, so an interrupted build no longer stalls indefinitely.
- **DiskANN pending-key sharding.** DiskANN pending keys are now sharded to remove a scan hotspot on the vector index, and the `diskann` dependency was upgraded to `0.54.0`.

## Bug fixes

- `[Query Engine]` View (computed `AS SELECT`) tables are now read-only - direct `CREATE`/`INSERT`/`UPDATE`/`UPSERT`/`RELATE`/`DELETE` against a view table is rejected rather than silently corrupting the materialized view. If you have code that wrote directly to a view table, it will now return an error.
- `[Schema]` Restored enforcement of `ASSERT` on the record `id` field, including via `ALTER FIELD`, so assertions declared on `id` are applied at write time again.
- `[Functions]` `duration::secs`, `duration::millis`, `duration::micros`, and `duration::nanos` no longer overflow to incorrect (often negative) values for very large durations. More broadly, integer-to-number conversions that exceed a signed 64-bit integer are now stored as `decimal` instead of being silently truncated, and values too large for `decimal` raise an error rather than wrapping - so these functions now return a `decimal` for counts beyond the `i64` range.

## Breaking changes

This beta introduces no new intentional breaking changes beyond those already listed for `v3.2.0-beta.1` (write-time enforcement of a typed `id`, and the experimental, opt-in OpenGQL surface). Note, however, that direct writes to view tables are now rejected (see Bug fixes); any code relying on that previously-unsupported behaviour will need to be updated.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.0-beta.3 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jun 26, 2026

## 3.2.0-beta.2

PRE-RELEASE

This is the second beta in the 3.2 series - a small, incremental build on top of `v3.2.0-beta.1`. It improves performance for larger SurrealDS clusters and fixes configuration parsing for human-readable `memory_threshold` byte suffixes.

Items tagged `[Enterprise]` refer to the SurrealDB Enterprise product. Everything else applies to community.

Everything introduced in `v3.2.0-beta.1` - experimental ISO GQL (Cypher Query Language, OpenGQL) querying, GraphQL/OpenGQL over RPC and MCP, the faster and safer server startup path, the background reaper for large `REMOVE` operations, write-time enforcement of a typed `id` field, and the query-engine performance work - is included in this build and is not repeated here.

## Improvements

- `[Enterprise]` Improved performance for SurrealDS clusters larger than 5 nodes.

## Bug fixes

- `[Config]` Fixed the `memory_threshold` configmap parse path rejecting human-readable byte suffixes (for example `256m` or `1g`) and emitting a spurious configuration-parse warning for the `MEMORY_THRESHOLD` key. The configmap path now shares the same suffix-aware `parse_memory_threshold` helper as the environment-variable path, so suffixed values are honoured without warnings.

## Breaking changes

This beta introduces no new breaking changes beyond those already listed for `v3.2.0-beta.1` (write-time enforcement of a typed `id`, and the experimental, opt-in OpenGQL surface).

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.0-beta.2 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Released Jun 24, 2026

## 3.2.0-beta.1

PRE-RELEASE

This is the first beta in the 3.2 series. It opens the line with a brand-new query surface - experimental ISO GQL (Cypher Query Language, OpenGQL) querying - alongside a faster and safer server startup path, a background reaper that takes large `REMOVE` operations off the request path, write-time enforcement of a typed `id` field, and a further round of query-engine performance work.

The items below cover what is new in the 3.2 line. The fixes already released across the `v3.1.1`–`v3.1.5` patches are also included in this build but are not repeated here.

## Highlights

### Experimental ISO GQL (Cypher Query Language, OpenGQL) querying

A first cut of standards-track [ISO GQL (Cypher Query Language)](https://www.iso.org/standard/76120.html) graph querying lands as an experimental feature, built as a self-contained pipeline in `surrealdb-core` (`opengql`) with its own lexer, parser, and AST. A lowering stage translates the parsed GQL onto SurrealDB's internal SurrealQL AST, so lowered queries execute through the same pipeline as SurrealQL (no SurrealQL text is generated or re-parsed).

- Queries can be sent over a new `POST /gql` HTTP route or the new `gql` RPC method.
- The language is gated behind the `opengql` experimental capability and is off by default. Enable it with `--allow-experimental opengql` (or `SURREAL_CAPS_ALLOW_EXPERIMENTAL=opengql`). The `gql` HTTP route itself follows the usual route capabilities, which allow all routes by default.
- **`MATCH` execution (v2).** Pattern matching runs through a `MatchPlan` binding-table executor that supports multi-pattern joins, `OPTIONAL MATCH`, and per-path traversal rather than a single fused chain.
- **Aggregates and `GROUP BY`.** `count`, `sum`, `collect`, `min`, `max`, and `avg` are supported, with grouping.
- **Path search.** `SHORTEST`, `ALL`, and `ANY` path search are available, along with path modes on `MATCH`.

This is an early, experimental surface - expect it to evolve across the 3.2 beta cycle.

### GraphQL and OpenGQL over RPC and MCP

The graph query surfaces are now reachable beyond their HTTP routes.

- Added a `graphql` RPC method, so GraphQL queries can be issued over the WebSocket/RPC protocol instead of only the `/graphql` HTTP endpoint.
- Both GraphQL and OpenGQL are now exposed through the first-party MCP server, letting MCP clients run graph queries directly.

### Faster, safer server startup

`surreal start` now separates "the listener is up" from "the datastore is ready to serve", which makes startup behave well behind orchestrators like Kubernetes.

- The HTTP/WS listener is bound **before** the startup import runs, and the startup import runs concurrently rather than blocking the bind.
- A new `/ready` endpoint reports readiness: it returns `200` only once deferred startup work (import and credential setup) has finished and - when a heartbeat budget is configured - the node's cluster heartbeat is fresh; otherwise it returns `503` (or `500` if the heartbeat can't be read).
- While the instance is still starting up, user-facing endpoints return `503`, but `/`, `/status` (liveness), `/health` (backend reachability), `/version`, `/metrics`, and `/ready` stay reachable so probes and scrapers keep working throughout startup.

### Background reaper for `REMOVE NAMESPACE` / `DATABASE` / `INDEX`

Large structural removals no longer reclaim their data inline on the statement's transaction.

- `REMOVE NAMESPACE`, `REMOVE DATABASE`, and `REMOVE INDEX` now delete only the catalog definition and enqueue the orphaned data prefix; a background reaper destroys the data out-of-band. This keeps the removing statement fast and bounded regardless of how much data the namespace/database/index held.
- The reaper honours a snapshot-safety grace period before physically reclaiming data, so read transactions whose snapshot predates the `REMOVE` can finish first. On TiKV this is coordinated with the MVCC GC safepoint - the effective grace is `max(reclaim_grace, tikv_gc_lifetime)`, so raising the GC lifetime alone can never make reclaim unsafe.
- New configuration:
  - `--reclaim-interval` / `SURREAL_RECLAIM_INTERVAL` (default `60s`) - how often the reaper runs.
  - `--reclaim-grace` / `SURREAL_RECLAIM_GRACE` (default `10m`) - minimum age before tombstoned data is physically reclaimed.

### Typed `id` enforced at write time

`DEFINE FIELD id` is now a first-class typed field that is validated when records are written.

- A `TYPE` on the `id` field is enforced at write time: creating a record whose id does not match the declared type fails with a coercion error (for example, an `int` id field rejects `badtype:notanint`).
- `DEFAULT` on the `id` field is supported and is evaluated against the session and coerced to the declared kind (for example `TYPE uuid DEFAULT rand::uuid()`), but `DEFAULT ALWAYS` is rejected because an explicit id must always win.
- An explicitly supplied id (via the target record id or the data clause) always takes precedence over the `DEFAULT`.

## Improvements

- **`DEFINE ANALYZER ... FUNCTION` hardening.** Tightened the function-backed analyzer path: SurrealML model functions are rejected, Surrealism module (`mod::`) functions require the `surrealism` experimental capability, the `FUNCTION` clause expects a function name rather than a function call (`fn::some`, not `fn::some()`), and the analyzer function is validated to return a string.
- **Configurable full-text doc-ids batch size.** The batch size used to allocate sequence-based document IDs for the concurrent full-text index is now configurable via `SURREAL_FTS_DOC_IDS_BATCH_SIZE` (default `1000`); larger batches reduce ID-allocation coordination between nodes.
- **Orphaned LIVE query metric.** A new counter tracks orphaned `LIVE SELECT` registrations, making it easier to spot live queries that have lost their owning session.
- **Surrealism version in the CLI.** A new `surreal module version` subcommand reports the Surrealism (WASM plugin) runtime version, separate from `surreal version` which continues to report the SurrealDB server version.
- **`[$]` (last element) on sets.** Sets now support the `[$]` last-part accessor, matching arrays.
- **`SHOW CHANGES` surfaces delete pre-images.** With `INCLUDE ORIGINAL`, the change feed now includes the pre-image of deleted records in `SHOW CHANGES` output.
- **`record::exists()` and `LIMIT 0` cleanups.** `record::exists()` now always returns a boolean, returning `false` for a record on an undefined table instead of erroring. Separately, `SELECT ... LIMIT 0` no longer short-circuits the table-existence check: it now behaves like the same query without `LIMIT 0` (for example, erroring on a nonexistent table in strict mode) rather than returning an empty array.
- **Query-engine performance.**
  - `DELETE` skips the reference purge scan entirely when the schema proves no references can exist.
  - Filtered kNN queries cut record I/O via batching, bounded prefetch, and missing-record skipping.
  - TopK threshold pushdown skips record decode for rows that fall below the `ORDER BY` + `LIMIT` heap threshold.
  - Zero-copy table scans via a per-row visitor (`for_each`) on the KV layer.
  - Sort keys are extracted once per row instead of being recomputed per comparison.
  - The pre-decode scan filter peeks record headers slice-directly in its wire comparator.
  - `TCP_NODELAY` is enabled on the HTTP/WS listener to disable Nagle's algorithm.
- **Dependency updates.** `wasmtime` bumped to 44.0.3 (addresses `RUSTSEC-2026-0182`), and the Surrealism crate versions were bumped.

## Bug fixes

- `[Access]` Reject `DURATION FOR TOKEN NONE` on `TYPE RECORD` access (via both `DEFINE` and `ALTER`), since record-access tokens can be consumed by third parties and must have an expiration rather than being non-expiring.
- `[Define API]` Reject duplicate methods in `DEFINE API`, whether declared across separate `FOR` clauses or within a single one.
- `[KV/TiKV]` Fan multi-get results to every position of a duplicate key, so a batched lookup that contains the same key more than once now fills each slot correctly.
- `[KV/TiKV]` Treat the TSO physical component as milliseconds rather than microseconds when interpreting timestamps.
- `[Query Engine]` Fixed a duplicate edge record id that could be produced during graph operations.

## Breaking changes

### Typed `id` is enforced at write time

If you have a `DEFINE FIELD id` with a `TYPE`, writes whose record id does not match the declared type are now rejected with a coercion error. Records created before this change are unaffected on read, but inserts/updates that previously slipped through with a mismatched id type will now fail. Review any `DEFINE FIELD id` definitions to confirm the declared type matches the ids you actually write.

#### OpenGQL is experimental and opt-in

The new `/gql` route and `gql` RPC method are gated behind the `opengql` experimental capability and are disabled by default. The surface is expected to change during the 3.2 beta cycle and should not be relied on in production.

Newer patch available

## Upgrade to 3.2.6

This is the 3.2.0-beta.1 changelog. 3.2.6 is the newest patch in this release line, with the latest fixes and improvements.

[View 3.2.6 release notes](https://surrealdb.com/releases/3.2#release-3-2-6)

Every release line

### [All releases](https://surrealdb.com/releases)

Newer release line

### [3.3](https://surrealdb.com/releases/3.3)

Updated Oct 13, 2026

Older release line

### [3.1](https://surrealdb.com/releases/3.1)

Updated Sep 1, 2026

GET STARTED

## Start building with SurrealDB. The database and memory for every agent, from object storage up.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Learn more](https://surrealdb.com/docs/what-is-surrealdb)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Releases","item":"https://surrealdb.com/releases"},{"@type":"ListItem","position":3,"name":"3.2","item":"https://surrealdb.com/releases/3.2"}]}
```

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"SurrealDB 3.2 release notes","description":"This small patch for 3.2 makes kNN queries return all k rows while an HNSW index is still folding in a bulk load, and adds an experimental endpoint that…","datePublished":"2026-10-18T00:00:00.000Z","dateModified":"2026-10-18T00:00:00.000Z","url":"https://surrealdb.com/releases/3.2","mainEntityOfPage":{"@type":"WebPage","@id":"https://surrealdb.com/releases/3.2"},"author":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com"},"publisher":{"@type":"Organization","name":"SurrealDB","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"about":{"@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","softwareVersion":"3.2"}}
```

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is a database for every agent. It starts on its first query, scales to zero when idle, speaks PostgreSQL and MySQL, and remembers in one query.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","AI agent database","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
