Skip to content

✨ PostgreSQL support - #1191

Merged
aaronleopold merged 42 commits into
nightlyfrom
eval/sb/psql
Aug 8, 2026
Merged

✨ PostgreSQL support#1191
aaronleopold merged 42 commits into
nightlyfrom
eval/sb/psql

Conversation

@aaronleopold

@aaronleopold aaronleopold commented May 30, 2026

Copy link
Copy Markdown
Collaborator

This PR piggybacks off of the work done by another (I became aware from #1167, thank you @sbeckstrand for your work) to add PostgreSQL support. There are a few seemingly unrelated changes in the mix, e.g. cargo chef in the Docker build, that on the surface seem fine but I have yet to meaningfully review. I may wind up pruning to keep this a more focused change, but we'll see.

I'm opening this PR a bit early in the hopes to get better visibility and help seeing it to the finish line. There are quite a few assurances I'd want via testing suites before really seriously considering a merge, since my immediate priority is ensuring existing or future SQLite-based installs do not break.

If you have time to help validate and/or improve, please feel free to base PRs into this branch.

You can provide a fully-resolved connection string via STUMP_DATABASE_URL or as separate vars:

  • STUMP_DB_PASSWORD
  • STUMP_DB_HOST
  • STUMP_DB_PORT
  • STUMP_DB_NAME
  • STUMP_DB_USER

Comment thread docs/content/docs/developer/contributing.mdx
@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 124 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
core/src/database.rs 0.00% 31 Missing ⚠️
crates/graphql/src/filter/mod.rs 28.12% 23 Missing ⚠️
crates/graphql/src/query/library.rs 0.00% 19 Missing ⚠️
crates/graphql/src/mutation/library.rs 0.00% 16 Missing ⚠️
crates/graphql/src/query/media.rs 65.51% 10 Missing ⚠️
core/src/filesystem/scanner/utils.rs 0.00% 6 Missing ⚠️
core/src/lib.rs 0.00% 4 Missing ⚠️
crates/graphql/src/object/library.rs 0.00% 4 Missing ⚠️
crates/graphql/src/object/series.rs 0.00% 4 Missing ⚠️
core/src/job/state.rs 0.00% 3 Missing ⚠️
... and 3 more
Files with missing lines Coverage Δ
core/src/config/stump_config.rs 81.38% <100.00%> (+0.16%) ⬆️
core/src/opds/v2_0/utils.rs 62.50% <100.00%> (ø)
crates/graphql/src/object/media.rs 14.34% <100.00%> (+12.01%) ⬆️
crates/graphql/src/object/stats.rs 99.49% <100.00%> (ø)
crates/graphql/src/utils.rs 58.33% <100.00%> (+58.33%) ⬆️
crates/models/src/entity/smart_list_access_rule.rs 100.00% <ø> (ø)
core/src/filesystem/scanner/library_scan_job.rs 0.00% <0.00%> (ø)
core/src/filesystem/scanner/walk.rs 0.00% <0.00%> (ø)
crates/graphql/src/query/series.rs 5.40% <0.00%> (ø)
core/src/job/state.rs 8.00% <0.00%> (ø)
... and 9 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sbeckstrand

sbeckstrand commented Jun 5, 2026

Copy link
Copy Markdown

I can come back to this and make some contributions next week. I was mostly just exploring if I could easily plug in a psql connection setup but found that it required some changes to existing queries. Agree that it would make sense to heavily vet and add testing as I was really in an exploration phase of seeing if I could make it work. Then I stepped away the last week and a half for vacation 😅

Changes to the dockerfile can be reverted entirely (related to the github workflow changes already reverted). I was making attempts to improve the image build time, but no real improvement was made there.

@aaronleopold

Copy link
Copy Markdown
Collaborator Author

This will go to nightly once #1315 is merged and released

@aaronleopold aaronleopold changed the title WIP ✨ PostgreSQL support ✨ PostgreSQL support Aug 2, 2026
@aaronleopold
aaronleopold marked this pull request as ready for review August 2, 2026 18:36
@aaronleopold

aaronleopold commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

I haven't encountered anymore postgres issues, doing a sanity pass on sqlite and then will merge this in

@aaronleopold
aaronleopold merged commit 5153d36 into nightly Aug 8, 2026
6 checks passed
@aaronleopold
aaronleopold deleted the eval/sb/psql branch August 8, 2026 17:44
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.

3 participants