Skip to content

Add ducklake_target_file_size session setting#1144

Open
utay wants to merge 1 commit into
duckdb:v1.5-variegatafrom
altertable-ai:yu/session-target-file-size
Open

Add ducklake_target_file_size session setting#1144
utay wants to merge 1 commit into
duckdb:v1.5-variegatafrom
altertable-ai:yu/session-target-file-size

Conversation

@utay
Copy link
Copy Markdown
Contributor

@utay utay commented May 11, 2026

This PR adds a ducklake_target_file_size session-level setting that overrides the target_file_size metadata option for both inserts and compaction. This is useful when concurrent sessions need different file size targets; for example, a background compaction session targeting large files while foreground inserts use a smaller size, without either modifying the shared catalog metadata.

Copy link
Copy Markdown
Member

@pdet pdet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @utay, thanks for the PR, I have some extra tests requests!


# Reset the session setting - metadata value (512MB) should now govern: everything in one file
statement ok
RESET ducklake_target_file_size
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test where you set ducklake_target_file_size after reset?

@@ -0,0 +1,54 @@
# name: test/sql/insert/insert_session_target_file_size.test
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that verifies a borked string fails at set?

e.g., 'not-a-size'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also cover compaction?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also validate this option is over other scopes? (e.g., per-schema, per-table)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if we set to '0'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants