Skip to content

feat(postgres): Add support for setting STRATEGY during db creation#343

Open
alexdor wants to merge 2 commits into
crossplane-contrib:masterfrom
alexdor:ado/feat-strategy-for-pg
Open

feat(postgres): Add support for setting STRATEGY during db creation#343
alexdor wants to merge 2 commits into
crossplane-contrib:masterfrom
alexdor:ado/feat-strategy-for-pg

Conversation

@alexdor
Copy link
Copy Markdown

@alexdor alexdor commented Mar 12, 2026

Description of your changes

Add PostgreSQL Database strategy support for template-based database creation and make its lifecycle explicit in the API. The new strategy field is treated as create-time-only, and validated so updates do not silently drift from the real database state.

Fail fast when strategy is requested against PostgreSQL versions older than 15 instead of letting CREATE DATABASE fail with a less clear SQL error.

Fixes #341

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

  • run test-integration
  • local testing

@alexdor alexdor marked this pull request as ready for review March 12, 2026 17:43
@alexdor alexdor force-pushed the ado/feat-strategy-for-pg branch from bb8246b to 279a689 Compare March 25, 2026 10:37
@alexdor alexdor force-pushed the ado/feat-strategy-for-pg branch from 3601ded to 076d337 Compare April 8, 2026 17:09
@alexdor
Copy link
Copy Markdown
Author

alexdor commented Apr 8, 2026

@fernandezcuesta sorry I thought that it was a flaky test (because it would pass locally sometimes, and I didn't touch any of the mysql parts). Should be fixed now

alexdor added 2 commits May 8, 2026 12:22
Add PostgreSQL Database strategy support for template-based database creation and make its lifecycle explicit in the API. The new strategy field is treated as create-time-only, and validated so updates do not silently drift from the real database state.

Fail fast when strategy is requested against PostgreSQL versions older than 15 instead of letting CREATE DATABASE fail with a less clear SQL error.

closes crossplane-contrib#341

Signed-off-by: Alexandros Dorodoulis <aldor94@gmail.com>
Signed-off-by: Alexandros Dorodoulis <aldor94@gmail.com>
@alexdor alexdor force-pushed the ado/feat-strategy-for-pg branch from 23b5af6 to e298bba Compare May 8, 2026 10:22
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: Support STRATEGY on Database

1 participant