DuckDB 2.0: How to migrate from 1.4 and 1.5 without breaking your database or Python code

DuckDB 2.0.0 LTS was released on October 21, 2026, and the first thing you need to know before updating is that installing the new version does not convert your database file. We verified it: we installed 2.0 alongside 1.4.5, opened a real database created in 1.4 with it, wrote to it, and reopened it in 1.4 without any issues. The file only moves to the new storage format when you migrate it yourself, and from that point on, earlier versions can no longer open it.

This guide covers what changes, what breaks in Python and SQL, how to migrate a database to the new format, and whether it’s worth updating now or waiting.

What is DuckDB?

DuckDB is an open-source analytical SQL database (OLAP) that runs inside your own process, with no server to install, and that queries Parquet, CSV, JSON files directly as well as its own .db files. It’s MIT-licensed, so it’s free, has 42.4K stars on GitHub, and is used from Python, the CLI, R, Java, Go, Rust, and the browser (Wasm).

Version 2.0.0 (“Cinnamon Teal”) is a long-term support (LTS) release with support until at least October 2027. The DuckDB team describes it as their largest feature release to date, built with nearly 20,000 commits since 1.5.

DuckDB vs SQLite: What’s the Difference?

Both are embedded databases that store everything in a single file, but they’re designed for different workloads. SQLite is optimized for many small transactional reads and writes, like an app saving records one by one. DuckDB stores data in columns and is optimized for scanning and aggregating large tables: sums, groupings, and joins on millions of rows. A quick way to think about it is to consider DuckDB as “SQLite for analytics”.

What’s New in DuckDB 2.0?

The main features are:

  • Client/server mode with CONNECT. The Quack remote protocol arrived in 1.5.3 in May. 2.0 brings a polished version and a new CONNECT statement that attaches a remote database and switches to it in one step. CONNECT also works against PostgreSQL and MySQL, where a new remote pushdown optimizer sends the query to the remote server instead of fetching full tables over the network.
  • Triggers. CREATE TRIGGER with BEFORE and AFTER, FOR EACH ROW and FOR EACH STATEMENT, and transition tables with REFERENCING OLD/NEW TABLE. Some combinations, like BEFORE ... FOR EACH ROW, are still not supported.
  • The VARIANT type as a first-class citizen for semi-structured data like JSON, stored in columnar format (“shredded”) instead of as text.
  • Asynchronous I/O for reading Parquet and CSV, which keeps multiple requests in flight. The improvement is most noticeable on object storage like s3://.
  • Agent mode in the CLI. When a programming agent like Claude Code, Codex, or Cursor handles the CLI, it switches to compact Markdown tables, warns when a result is truncated, and reports errors in JSON. According to DuckDB, in their own TPC-H experiments this reduced the output the model had to read by 59 percent. You can force it with -agent or disable it with -no-agent.
  • A new PEG-based SQL parser becomes the default and replaces the one derived from PostgreSQL.

Does Updating DuckDB Convert Your Database File?

No. When DuckDB 2.0 opens a database created with an earlier version, the file retains its storage version and remains readable by that earlier version. In our test, a database created with 1.4.5 continued to report storage_version: v1.0.0+ after 2.0 opened it and inserted a row, and 1.4.5 reopened it afterward with the new row intact.

The incompatibility goes the other way. Any new file created by 2.0 uses 2.0’s storage format, and versions before 2.0 cannot read it. In our test, 1.4.5 failed to open a file created with 2.0 with an IO Error indicating the file was created with a newer version of DuckDB.

The real risk is in mixed environments: if multiple processes share a file and one of them, already on 2.0, creates it, processes still on 1.x can no longer open it. The migration guide explicitly warns about this: verify that all processes touching a shared file are on a compatible version.

You can check what format a file is in with:

SELECT database_name, tags FROM duckdb_databases();

How to Migrate a Database to DuckDB 2.0?

Export it with the earlier version and import it with the new one. This is what the migration guide indicates (duckdb 2.0 migration):

/older/duckdb mydata.old.db -c "EXPORT DATABASE 'tmp'"
/newer/duckdb mydata.new.db -c "IMPORT DATABASE 'tmp'"

We did the same two steps from Python (1.4.5 to export, 2.0.0 to import) and all rows passed through. The guide also mentions COPY FROM DATABASE as an alternative.

If you need the opposite—new files that earlier versions can still read—explicitly set the storage version. In the CLI:

duckdb my.db -storage-version v1.5.6 -c "CREATE TABLE t (x INT);"

In Python:

duckdb.connect("my.db", config={"storage_compatibility_version": "v1.5.0"})

The same setting is available as the storage_compatibility_version configuration option or as the STORAGE_VERSION option of ATTACH.

What Breaks When Using DuckDB 2.0 with Python?

The Python client accumulates the most breaking changes. The ones most likely to affect your code are:

  • Python 3.11 or higher is required. On Python 3.10, pip install duckdb silently installs a 1.x version. CPython free-threaded builds are not supported.
  • Arrow and Polars output removed from execute(). con.execute(q).fetch_arrow_table(), fetch_record_batch(), arrow(), and pl() no longer exist. Use a relation instead: con.sql(q).to_arrow_table(), con.sql(q).to_arrow_reader(), or con.sql(q).pl().
  • Relations no longer return rows one by one. rel.fetchone(), rel.fetchmany(n), rel.execute(), and rel.fetch_df_chunk() disappear. Use con.execute(q) for fetch loops, rel.iter_rows() to iterate, and rel.materialize() to compute and retain the result.
  • A connection used from multiple threads now raises an error. A call while another thread is using the connection raises ResourceInUseException. Give each thread its own con.cursor().
  • Open results block the connection. Running another query while a result from execute() is halfway through raises ResourceInUseException until you finish reading it or call con.complete() or con.abort().
  • Any failed statement aborts the transaction. After con.begin(), a failing execute() causes the transaction to roll back on commit.
  • Plain strings in expressions are values, not column names. Write col("x") for a column and lit("x") for text; names with a dot need col("t", "x").
  • write_csv and write_parquet with overwrite=False now raise IOException if the file already exists, instead of replacing it.
  • The Arrow batch size defaults down from 1,000,000 to 131,072 rows; pass batch_size if you need a different one.

What Changes in DuckDB 2.0 SQL?

  • Arrow lambdas are disabled by default. x -> x + 1 now fails with a binder error; write lambda x: x + 1. With SET lambda_syntax = 'enable_single_arrow'; you can temporarily reactivate the old form, but both the setting and that syntax disappear in 2.1.
  • Integer division and modulo by zero now raise an error. 1 // 0 previously returned NULL and now fails. Wrap it as TRY(1 // 0) or use SET error_on_division_by_zero = false to recover the global NULL. Normal division 1 / 0 still returns inf.
  • S3 settings in the URL are ignored. s3://bucket/file.csv?s3_access_key_id=... now treats the ?… as part of the object key. Use secrets or, if you need it, revert to the old behavior with SET s3_enable_deprecated_url_parameters = true after loading httpfs.
  • Removed settings: custom_profiling_settings (use tracked_metrics), enable_http_logging and http_logging_output (use CALL enable_logging('HTTP')). profiling_mode is deprecated and has no effect.
  • The new parser is designed to be compatible. If a query that previously worked now fails, INSTALL AND LOAD legacy_parser; SET enable_legacy_parser = true; switches back to the previous parser while you report it.

How to Install DuckDB 2.0?

On Python, pip install duckdb installs 2.0.0 from October 21, 2026 (we verified it), as long as you use Python 3.11 or higher. To upgrade an existing environment, use pip install --upgrade duckdb.

For the CLI, the official installers are:

curl https://install.duckdb.org | bash      # macOS / Linux
winget install DuckDB.cli                   # Windows

At the time of publishing this note, DuckDB’s installation page still showed 1.5.6 as the “current” version, so run duckdb --version after installing to confirm you have 2.0.0. The announcement indicated that clients for Go, R, and Java, and some extensions, would arrive in the following days, and Node.js packages had not been updated when we checked.

How Does DuckDB Work as a Server?

Any DuckDB process can serve its databases via Quack (duckdb client server), and any other DuckDB can connect to it. According to the announcement, on the server:

CALL quack_serve(token = 'my_token');

And on the client:

ATTACH 'quack:localhost' AS qk (TOKEN 'my_token');
CONNECT qk;
SELECT * FROM events;

From the CLI, duckdb -serve starts a server and duckdb -connect connects to it.

By default, the server only listens on localhost. To accept connections from other machines, the documented approach is to keep it on localhost behind a reverse proxy that terminates TLS; the allow_other_hostname option, which exposes it directly, is intended for testing only. (We couldn’t run this part: quack_serve installs the quack extension the first time it’s used, and our test environment blocks extension downloads. The syntax above is from the official announcement.)

Should You Migrate to DuckDB 2.0 Now or Wait?

It depends on the version you’re on and how critical your workload is:

  • If you’re on 1.4 LTS: its support ends on November 17, 2026. You need a plan either way, whether 2.0 or 1.5 as a bridge.
  • If you’re on 1.5: its support was extended to March 2027, so there’s no rush.
  • Critical workloads: the DuckDB team itself recommends waiting for the first patch, expected in November, and testing on a mirror system that replicates production before switching.
  • Notebooks, scripts, and single-process tools: upgrading is low-risk, because your existing files remain readable by 1.x until you deliberately convert them.

What about you? What version of DuckDB do you have in production today?

When will you migrate to DuckDB 2.0?
  • I’ve already migrated
  • This week
  • After the November patch
  • I prefer another option (tell us which)
0 votantes

Comment below or, if this article reached you by email, reply directly to the email: your reply will be published here.

Related: MIT License is not a governance guarantee: what the DuckDB Foundation really ensures for you