From 0c1e23fbd59fdfd4b52d59d5fde41d3208800828 Mon Sep 17 00:00:00 2001 From: Ben King <9087625+benfdking@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:06:00 +0200 Subject: [PATCH 1/2] docs: duckdb vscode warning --- docs/guides/vscode.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guides/vscode.md b/docs/guides/vscode.md index f21bd2c165..4d9467198c 100644 --- a/docs/guides/vscode.md +++ b/docs/guides/vscode.md @@ -139,6 +139,10 @@ The SQLMesh VSCode extension provides the following commands in the VSCode comma ## Troubleshooting +### DuckDB concurrent access + +If you are using DuckDB as your state store, you are likely to encounter problems with concurrent access to the DuckDB database file. The DuckDB database file is a single file on disk, and it does not support concurrent access from multiple processes. The extension uses a long-running process to provide its features. This long-running requires access, and so there is a risk of database locks. We don't recommend using DuckDB as a state store with the VSCode extension for this reason. + ### Python environment woes The most common problem is the extension not using the correct Python interpreter. From 04ba05af71501475cc2a9dec99a8473ee191e31d Mon Sep 17 00:00:00 2001 From: Ben <9087625+benfdking@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:08:47 +0200 Subject: [PATCH 2/2] Update docs/guides/vscode.md Co-authored-by: Trey Spiller <1831878+treysp@users.noreply.github.com> --- docs/guides/vscode.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/guides/vscode.md b/docs/guides/vscode.md index 4d9467198c..fa6245ace1 100644 --- a/docs/guides/vscode.md +++ b/docs/guides/vscode.md @@ -141,7 +141,13 @@ The SQLMesh VSCode extension provides the following commands in the VSCode comma ### DuckDB concurrent access -If you are using DuckDB as your state store, you are likely to encounter problems with concurrent access to the DuckDB database file. The DuckDB database file is a single file on disk, and it does not support concurrent access from multiple processes. The extension uses a long-running process to provide its features. This long-running requires access, and so there is a risk of database locks. We don't recommend using DuckDB as a state store with the VSCode extension for this reason. +If your SQLMesh project uses DuckDB to store its state, you will likely encounter problems. + +SQLMesh can create multiple connections to the state database, but DuckDB's local database file does not support concurrent access. + +Because the VSCode extension establishes a long-running process connected to the database, access conflicts are more likely than with standard SQLMesh usage from the CLI. + +Therefore, we do not recommend using DuckDB as a state store with the VSCode extension. ### Python environment woes