Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows setting of some pragma values through environment variables #3899

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

mikiher
Copy link
Contributor

@mikiher mikiher commented Jan 26, 2025

Brief summary

Adds support for setting some whitelisted SQLite PRAGMA values through environment variables.

Which issue is fixed?

Fixes #3750

In-depth Description

A whitelist of allowed pragma settings is defined, which currently contains mmap_size, cache_size, and temp_store.
Users can set the values for those pragmas, by setting the environment variable SQLITE_<UPPERCASE_PRAGMA_NAME> (e.g. SQLITE_MMAP_SIZE) to the requested value.

These helped the reporting user optimize their database, and could be used by us in the future to set reasonable default values.

How have you tested this?

Set up all the supported pragmas through the corresponding env variables.

@mikiher mikiher marked this pull request as ready for review January 26, 2025 11:56
@advplyr
Copy link
Owner

advplyr commented Jan 27, 2025

Thanks!

@advplyr advplyr merged commit fbe186a into advplyr:master Jan 27, 2025
5 checks passed
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.

[Enhancement]: Allow adjustment of SQLITE PRAGMA values
2 participants