NEW

SurrealDB 4 is here, introducing SurrealDB Earth and SurrealDS!

Learn more

SurrealDB 2.7

Patches. 1 patch release on the 2.7 line, with the release date and full notes for each below.
Latest. 2.7.0, released Sep 28, 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.

SurrealDB 2.7.0 makes REMOVE NAMESPACE and REMOVE DATABASE return straight away, however much data they remove, and deletes that data in the background. It…

Newer release line available: 3.0 →

Released Sep 28, 2026

2.7.0

SurrealDB 2.7.0 makes REMOVE NAMESPACE and REMOVE DATABASE return straight away, however much data they remove, and deletes that data in the background. It also fixes COUNT indexes, which the 2.x line never compacted, and stops databases without a changefeed from recording changefeed timestamps.

A 2.6 datastore upgrades in place. Read the 2.6 to 2.7 upgrade guide before upgrading, because a datastore that has run 2.7.0 cannot safely return to 2.6.

2.7.0 contains no security fixes, and the advisories fixed in 3.3.0 list 2.x releases as affected too. See Security below.

REMOVE NAMESPACE and REMOVE DATABASE now delete the definition and return at once, and a background task deletes the data afterwards in batches that resume after a restart. On 2.6, removing a large database could fail with Failed to commit transaction due to a read or write conflict or never finish. Once every node runs 2.7.0, the removed data cannot be read from the moment the statement commits, and --reclaim-interval (SURREAL_RECLAIM_INTERVAL, default 60s) sets how often the task runs.

Behaviour after removal · Removal in the background

  • Changefeeds only track the databases that use them. A database that defines no changefeed no longer records a timestamp at every changefeed clean-up (every 10 seconds by default), and the timestamps it recorded on earlier 2.x releases are deleted after the upgrade. Background work after the upgrade

  • Background clean-up commits in batches. Changefeed clean-up and index compaction now commit 1,000 keys at a time, so a large backlog no longer runs as one transaction.

  • Config::reclaim_interval in the Rust SDK sets the reclaim interval for an embedded datastore.

  • Fixed COUNT indexes never being compacted since they were added in 2.4.0, so a count served by the index read one entry for every record ever created or deleted on the table. The first compaction after the upgrade combines those entries. Background work after the upgrade

  • Fixed SHOW CHANGES ... SINCE <datetime> failing with an internal error when the datetime was earlier than the first timestamp the database had recorded. It now returns the changes from the start of what is retained, and a datetime in the future returns none.

2.7.0 contains no security fixes. Several advisories fixed in 3.3.0, three of them rated Critical, list every release before 3.3.0 as affected, and that includes 2.7.0. Their fixes ship in 3.3.0, and the 3.3.0 security notes list each advisory. Moving from 2.x to 3.x follows the 2.x to 3.x migration guide.

The 2.6 to 2.7 upgrade guide covers each of these in detail.

  • Back up the whole datastore first if you may need to roll back. 2.6 does not know that a removal can leave data on disk, so it can serve a removed database's data again and let its users sign in. The way back to 2.6 is a backup taken before the upgrade: a storage snapshot, or an export of every database plus a record of the root and namespace-level users and access methods, which no export contains. Rolling back to 2.6

  • Rolling upgrades. Until every node runs 2.7.0, a 2.6 node can still serve the data of a namespace or database removed on an upgraded node, so remove namespaces and databases only after the last node is upgraded. Clusters and rolling upgrades

  • Reusing a removed name deletes what is left first. Defining a namespace or database under the name of one still being deleted clears up to 10,000 keys of the old data in the same transaction. If more is left, the statement fails with The name '...' cannot be reused until the data of the removed namespace or database has been reclaimed, and succeeds once the background task has caught up. Reusing a removed name

  • Every removal deletes stored versions. Removing a namespace or database now deletes its version history, as AND EXPUNGE did, and AND EXPUNGE returns before the data is deleted.

Upgrade or install

Get SurrealDB v2.7.0

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

Upgrade a Cloud instance to v2.7.0 in four steps:

  1. Select your organisation and instance
  2. On the dashboard, select “Upgrade”
  3. The instance updates and restarts automatically
Full install guide

GET STARTED

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

ISO 27001
AICPA SOC 2 Type 2
Cyber Essentials
GDPR
Cyber Essentials Plus