-
Notifications
You must be signed in to change notification settings - Fork 66
Description
What happens?
When connecting to DuckDB 1.5.1 through JDBC using DBeaver on Windows, DuckDB assigns the temporary directory:
temp_directory = .tmp
This path is invalid on Windows, resulting in:
IO Error: Failed to create directory ".tmp": Invalid path
The same setup with DuckDB 1.4.4 correctly sets:
temp_directory = \mydatabase.duckdb.tmp
so no error occurs.
Expected behavior
DuckDB should assign a valid writable temporary directory on Windows, similar to:
temp_directory = <db_file>.tmp
as done in version 1.4.4, or fall back to a correct system temp folder (e.g. %TEMP%).
Observed behavior
In version 1.5.1:
- temp_directory becomes \.tmp
- Windows interprets \.tmp as an invalid UNC path
- Any operation requiring temp spill fails with an IO error
This behavior matches known issues where DuckDB attempts to create a .tmp directory in read‑only or invalid locations.
Steps to reproduce
Windows 11
DBeaver
- Create a connection using DuckDB JDBC driver 1.5.1
- Open SQL editor and run:
SELECT * FROM duckdb_settings() WHERE name='temp_directory';
Observe the value \.tmp
Run any query requiring temporary storage (e.g. large intermediate sort)
DuckDB fails with:
IO Error: Failed to create directory ".tmp"
DuckDB versions tested
1.4.4 → works correctly
1.5.1 → temp_directory=.tmp (invalid)
Environment
OS: Windows 11
Client: DBeaver + JDBC
Database: Single-file DuckDB
Filesystem: Local, fully writable
Workaround
Manually setting:
SET temp_directory='C:/Users//AppData/Local/Temp';
fixes the issue, confirming the problem is in DuckDB's automatic temp directory resolution.
Request
Please restore the previous behavior or implement a Windows‑safe fallback when computing temp_directory, so JDBC users on Windows do not receive invalid paths like \.tmp.