Skip to content

feat: add PostgreSQL database driver support#1

Draft
Copilot wants to merge 3 commits into
developfrom
copilot/assess-pg-adaptation-difficulty
Draft

feat: add PostgreSQL database driver support#1
Copilot wants to merge 3 commits into
developfrom
copilot/assess-pg-adaptation-difficulty

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 9, 2026

  • Fix clippy lint errors (doc_markdown, cast_possible_truncation, single_match_else, manual_let_else)
  • Fix MySQL URL format in configuration docs (missing @host) — review suggestion
  • Fix doc capitalization: MysqlMySQL — review suggestion
  • Fix grammar: "Test for" → "Tests for" — review suggestion
  • Full workspace build: cargo check --workspace
  • Full workspace clippy: cargo clippy --workspace -- -D warnings ✅ (zero warnings)
  • Formatting: cargo +nightly fmt --check
  • Configuration tests: 12 passed ✅
  • Tracker-core lib tests: 123 passed ✅

- Add PostgreSQL variant to configuration and tracker-core Driver enums
- Add r2d2_postgres dependency to tracker-core
- Create PostgreSQL driver implementation with all Database trait methods
- Use std::thread::scope to avoid tokio runtime conflicts (sync postgres
  crate creates its own internal tokio runtime)
- Implement custom Drop to safely destroy connection pool outside tokio
- Add GenericConnectionError variant to database Error enum
- Add PostgreSQL password masking in configuration
- Add tests for local PostgreSQL and testcontainers
- Update module documentation

Agent-Logs-Url: https://github.com/DamnCrab/torrust-tracker/sessions/b75f4713-d498-4ee2-9224-e0e452ec2f3b

Co-authored-by: DamnCrab <42539593+DamnCrab@users.noreply.github.com>
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