Get AI summaries of any video or article — Sign up free
The future of Logseq - Sneak peek at the DB Branch thumbnail

The future of Logseq - Sneak peek at the DB Branch

Tools on Tech·
5 min read

Based on Tools on Tech's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

The DB branch targets the engine/storage layer to replace markdown-file persistence with a database-backed approach.

Briefing

Logseq’s “DB branch” is a major behind-the-scenes shift aimed at replacing the app’s current markdown-file backend with a real database-backed engine—fixing long-standing stability and multi-window editing problems while unlocking faster, more scalable performance. The branch is far ahead of the production “master” line (thousands of commits), and it’s already been partially merged back so the work is actively converging toward something end users could eventually run.

The core motivation is that Logseq stores data locally, primarily as markdown. That approach works for single-user editing, but it struggles when multiple editing contexts need to coordinate—such as opening a second window and making changes that the first window must reconcile. With markdown as the persistence layer, Logseq can’t easily understand that two windows are working on different “screens” or that their changes should be treated as compatible updates. The result is a brittle experience: warnings about disk changes, missing metadata, and a growing mismatch between what users expect from a structured knowledge tool and what a text-format backend can reliably support.

The DB branch targets the “engine” layer—the component between the user interface and the stored data. The transcript frames this as a rewrite that must preserve compatibility with years of user-created content and workflows. Like improving a house over time, the system has accumulated many “fixtures” (features, assumptions, data formats) that a new engine must still support. That’s why the change takes so long: it’s not just building a database, but migrating behavior, preserving exports/imports, and ensuring the new engine doesn’t break existing users.

A key promise is better performance and stability through database-style access patterns. Instead of loading the entire note graph into memory, the database backend could fetch only what’s needed, reducing memory pressure and speeding up large workspaces. The transcript also highlights export as a practical concern: the DB branch introduces an “SQL light” export, but early tests produced a key-value style output with EDN-encoded data—useful for round-tripping but disappointing for users who want human-readable exports. By contrast, standard markdown exports remain clean and portable, and the speaker argues that export quality will determine whether users can confidently adopt the new backend.

On the user-facing side, the DB branch also changes how Logseq models data. The interface introduces clearer separation between “graph/database” modes and adds property-driven block types that feel more like configurable templates. Tags can generate extra properties automatically (e.g., a “meeting” tag populates structured fields), and tasks become property-based rather than a separate concept. Property types include text, numbers with choices, dates, checkboxes, URLs, and pages—plus inheritance via classes—letting users build structured systems (like books with authors and GoodReads links) without scattering custom schemas across the graph.

Overall, the DB branch is portrayed as a foundational upgrade: a database-backed engine to stabilize multi-window editing and improve scalability, paired with a more structured, property-centric UX. Remaining gaps include polishing task formatting, clarifying how templates work, and expanding query and view options (boards, calendars) once the backend is ready for broader load testing and optimization.

Cornell Notes

Logseq’s DB branch is a large effort to move from a markdown-file backend toward a database-backed engine. The goal is to fix stability issues (especially around multi-window editing) and improve performance by enabling structured metadata and more efficient data access. The change is difficult because it must preserve compatibility with years of user data and workflows, and it requires careful migration and UX refinement before release. Early experiments show new property-driven block types and class/tag inheritance that make building structured systems easier. Export remains a deciding factor: markdown exports look clean, while the new SQL light export appears more like an internal round-trip format than a human-friendly one.

Why does a markdown-based backend create problems for Logseq’s editing experience?

Markdown is primarily a text-formatting system, not a structured database. When Logseq persists data as markdown files, it becomes hard to coordinate concurrent edits across contexts—like two open windows. The transcript describes a failure mode where one window changes a page while the other window expects its own view to remain consistent, triggering warnings because the app can’t reliably treat the other window’s edits as compatible updates. The approach also limits how much metadata can be stored without bloating the markdown files, since adding rich per-line/per-update metadata would make files unreadable.

What does the DB branch change at a technical level, and why is that “engine” work so time-consuming?

The DB branch focuses on the engine layer—the component that writes and reads data between the UI and storage. The transcript frames this as a rewrite that must preserve backward compatibility with everything users already built. Like maintaining a house with many incremental upgrades, the new engine must remain compatible with existing “fixtures” (features and assumptions) while also enabling future capabilities. That’s why the work takes long: it’s not only building a database, but migrating behavior, ensuring stability first, and then optimizing speed and UX.

How does the DB branch aim to improve performance and scalability?

A database backend can reduce the need to load the entire note graph into memory. Instead of keeping everything resident, the system can fetch elements on demand, which lowers memory usage and reduces processing overhead. The transcript links this directly to faster interaction for large graphs and a lighter footprint on the user’s machine.

What export formats are mentioned, and what trade-offs appear in early testing?

The transcript mentions a new “SQL light” export that outputs a key-value style table with an ID and a single text field containing EDN-encoded data. That format is machine-friendly for round-tripping but feels disappointing to users expecting more readable or structured exports. Standard markdown exports are described as clean and portable, and the speaker argues that export quality—especially the ability to move data to other tools—will strongly influence adoption.

What user-facing UX changes stand out in the DB branch?

The interface introduces clearer separation between database/graph modes and emphasizes property-driven blocks. Tags can automatically add extra properties (e.g., a “meeting” tag yields meeting-specific fields). Tasks shift toward being property-based rather than a separate block type. The system also supports class inheritance and property inheritance, letting users build structured schemas (like a “book” class with authors, GoodReads links, and release year) that can be reused across the graph.

How does class/tag inheritance help users build consistent systems?

Inheritance lets one structured type reuse and extend properties from another. The transcript describes configuring a “source” tag and then using classes to inherit fields, such as defining a base “person” class and then specialized subclasses like “work person” or “customer.” When users apply these structured types, the graph becomes more consistent because properties and choices come from the schema rather than being recreated ad hoc for every new page.

Review Questions

  1. What specific multi-window editing failure mode is attributed to Logseq’s markdown backend, and why can’t markdown easily solve it?
  2. Why does the transcript compare rewriting the Logseq engine to improving a house over time? What compatibility risks does that imply?
  3. How do property types and class inheritance change the way users build structured workflows in the DB branch?

Key Points

  1. 1

    The DB branch targets the engine/storage layer to replace markdown-file persistence with a database-backed approach.

  2. 2

    Markdown storage makes multi-window synchronization brittle because it lacks a structured concurrency model.

  3. 3

    The rewrite is slow because it must preserve compatibility with existing user data and workflows while enabling future features.

  4. 4

    A database backend can improve scalability by fetching only needed data instead of loading the entire graph into memory.

  5. 5

    Early DB-branch exports include a “SQL light” format that appears more like an internal EDN round-trip than a human-friendly export.

  6. 6

    The DB branch’s UX shifts toward property-driven blocks, with tags generating fields and classes supporting inheritance for reusable schemas.

  7. 7

    Remaining work includes polishing task formatting, clarifying templates, and expanding view/query features like boards and calendars once stability and speed are addressed.

Highlights

The DB branch is positioned as a foundational engine upgrade: it aims to fix stability and multi-window editing issues caused by markdown-based persistence.
Performance gains are tied to database-style access—fetching what’s needed instead of keeping the whole graph in memory.
Property-driven UX is a major visible change: tags can auto-add fields, and classes can inherit properties to keep schemas consistent.
Export quality is treated as a make-or-break factor: markdown exports look clean, while the SQL light export is EDN-encoded and less satisfying for manual inspection.

Topics

  • Logseq DB Branch
  • Database Backend
  • Engine Rewrite
  • Property Schemas
  • Export Formats

Mentioned

  • EDN
  • SQL