Skip to content

Could not write temp file and throw Invalid argument during BIG table sort #156

Open
@erictioh

Description

@erictioh

As you can see below, i have a table with 56 million rows, and attemping to perform sorting to "hierarchy_path" column will cause it to fail with invalid argument. i observed 400 + tmp files are being created on and off during the execution and after 5 minutes it goes off with error, i consider it crashed or at least not completing the SQL to create the table.

duckdb "/db/com.db"
v1.2.1 8e52ec4395
Enter ".help" for usage hints.
D select count(*) from asset_tree;
┌─────────────────┐
│ count_star() │
│ int64 │
├─────────────────┤
│ 56452767 │
│ (56.45 million) │
└─────────────────┘
D

duckdb "/db/com.db"
v1.2.1 8e52ec4395
Enter ".help" for usage hints.
D create table eric as
select * from asset_tree order by hierarchy_path;
49% ▕█████████████████████████████▍ ▏ IO Error:
Could not write file "/db/com.db.tmp/duckdb_temp_block-4611686018427598582.block": Invalid argument
D .quit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions