Skip to content

feat: Add PostgreSQL 18 driver + driver refactor#33

Open
Unbreathable wants to merge 9 commits intomainfrom
feat/postgres-18
Open

feat: Add PostgreSQL 18 driver + driver refactor#33
Unbreathable wants to merge 9 commits intomainfrom
feat/postgres-18

Conversation

@Unbreathable
Copy link
Contributor

Description

  • This MR adds a PostgreSQL driver in the new pkg/databases directory for drivers that supports PostgreSQL 18 and its new container layout
  • The basic container lifecycle has been moved to a new mservices package for more easily creating drivers
  • The PostgreSQL legacy driver has been upgraded to use the new API (will be maintained until PostgreSQL 20 is out)
  • The real-project example has been updated to use the new PostgreSQL 18 driver

@Unbreathable Unbreathable added this to the Magic v3 milestone Mar 5, 2026
@Unbreathable Unbreathable self-assigned this Mar 5, 2026
@Unbreathable Unbreathable linked an issue Mar 5, 2026 that may be closed by this pull request
@Unbreathable Unbreathable requested a review from Copilot March 5, 2026 13:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new PostgreSQL 18 service driver under pkg/databases/postgres, refactors Docker container lifecycle logic into reusable mrunner/services helpers, and migrates the legacy driver + real-project example to the new API.

Changes:

  • Introduce new PostgreSQL 18 driver (pkg/databases/postgres) with container lifecycle, health checks, initialization, and instruction handling.
  • Add mrunner/services helpers for managed container create/recreate + container exec, and update the legacy driver to use them.
  • Update examples/real-project to use the new PostgreSQL 18 driver.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
pkg/databases/postgres/postgres.go New PostgreSQL 18 driver implementation and config helpers
pkg/databases/postgres/postgres_container.go Container creation/health/init for new driver via mservices
pkg/databases/postgres/postgres_instruct.go Clear/drop table instructions for new driver
pkg/databases/postgres/go.mod New submodule definition for postgres driver
pkg/databases/postgres/go.sum Dependency locks for new postgres submodule
pkg/databases/postgres-legacy/postgres_legacy_container.go Refactored legacy container lifecycle to use mservices helpers
pkg/databases/postgres-legacy/postgres_legacy.go Updated legacy driver docs/comments
pkg/databases/postgres-legacy/go.mod Dependency cleanup / reclassification (direct -> indirect)
mrunner/services/containers.go New shared “managed container” creation/recreate logic
mrunner/services/containers_exec.go New shared helper to exec commands in containers
go.work Add postgres driver submodule to workspace
examples/real-project/starter/config.go Switch example to new postgres (18) driver
examples/real-project/go.mod Switch example module dependency/replace to new postgres driver

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Unbreathable and others added 8 commits March 7, 2026 10:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Unbreathable Unbreathable requested a review from tiemingo March 7, 2026 10:08
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.

Postgres Version 18 Support

2 participants